From owner-freebsd-bugs Thu Apr 11 20:20:19 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BAE1A37B41A for ; Thu, 11 Apr 2002 20:20:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3C3K0819883; Thu, 11 Apr 2002 20:20:00 -0700 (PDT) (envelope-from gnats) Received: from internet.simplifiedtechnology.com (internet.simplifiedtechnology.com [168.103.109.65]) by hub.freebsd.org (Postfix) with ESMTP id E047337B405 for ; Thu, 11 Apr 2002 20:10:11 -0700 (PDT) Received: from stcinc.com ([10.2.1.2]) by internet.simplifiedtechnology.com (8.10.2/8.10.2) with ESMTP id g3C39KN36206 for ; Thu, 11 Apr 2002 20:09:20 -0700 (PDT) Message-Id: <3CB64FF6.4CC2D434@stcinc.com> Date: Thu, 11 Apr 2002 20:09:42 -0700 From: Gregory Carvalho To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/37013: ls directory name output trailing slash duplcation - PATCH Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37013 >Category: bin >Synopsis: ls directory name output trailing slash duplcation - PATCH >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 11 20:20:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Gregory Carvalho >Release: FreeBSD 4.5-RELEASE i386 >Organization: Simplified Technology Company >Environment: >Description: ls outputs an aesthetically unpleasant double slash at the conclusion of a direc tory name when the -d and -F options are used and a slash is appended to the dir ectory name in the argument list. >How-To-Repeat: # ls -dF /usr/ /usr// # >Fix: *** ls.slashfix.c Thu Apr 11 19:36:07 2002 --- ls.c Wed Aug 16 12:57:11 2000 *************** *** 570,584 **** continue; } } - /* - * Strip a trailing slash in argv if the options -d and -F - * are in the option list. - */ - if (f_listdir && f_type && - !strcmp(cur->fts_name + cur->fts_namelen - 1, "/")) { - strcpy(cur->fts_name + cur->fts_namelen - 1, "\0"); - cur->fts_namelen -= 1; - } if (cur->fts_namelen > maxlen) maxlen = cur->fts_namelen; if (f_octal || f_octal_escape) { --- 570,575 ---- >Release-Note: >Audit-Trail: >Unformatted: >System: FreeBSD newest.simplifiedtechnology.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Apr 1 21:55:35 PST 2002 root@newest.simplifiedtechnology.com:/usr/src/s ys/compile/NEWEST i386 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message