NetBSD Problem Report #1495
From gnats Fri Sep 22 03:41:44 1995
Received: from dslab1.cs.uit.no (root@dslab1.cs.UiT.No [129.242.16.21]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id DAA16094 for <gnats-bugs@gnats.netbsd.org>; Fri, 22 Sep 1995 03:41:40 -0400
Message-Id: <199509220721.JAA00104@dslab1.cs.uit.no>
Date: Fri, 22 Sep 1995 09:21:42 +0200
From: tage@cs.uit.no
Reply-To: tage@acm.org
To: gnats-bugs@gnats.netbsd.org
Subject: Bad feature in ls(1)
X-Send-Pr-Version: 3.2
>Number: 1495
>Category: bin
>Synopsis: ls -R adds a '/'
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 22 03:50:01 +0000 1995
>Closed-Date: Thu Jul 10 22:12:55 +0000 1997
>Last-Modified: Thu Jul 10 22:14:07 +0000 1997
>Originator: Tage Stabell-Kulo
>Release: <NetBSD-current source date> NetBSD 1.0A
>Organization:
University of Tromsoe, Norway
>Environment:
System: NetBSD dslab1.cs.uit.no 1.0A NetBSD 1.0A (GENERIC) #0: Mon Aug 21 22:07:03 PDT 1995 thorpej@basalt:/work/netbsd/src/sys/arch/hp300/compile/GENERIC hp300
>Description:
"ls -R ./" adds the prefix to the paths as they are printed. This
results in filenames being printed as .//foo rather than ./foo.
>How-To-Repeat:
ls -R ./
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Mon Sep 25 20:45:18 1995
State-Changed-Why:
I was going to say that this behavior was present in other ls
implementations, but I checked SunOS, Solaris, and OSF/1 and
found that not to be true.
Perhaps this could be fixed by a function that strips trailing
newlines like is done in rm / rmdir. I'll have to check.
State-Changed-From-To: analyzed->closed
State-Changed-By: phil
State-Changed-When: Thu Jul 10 15:12:55 PDT 1997
State-Changed-Why:
Fixed by fixing lib/libc/gen/fts.c to never append a / to a path
when the path already ends in a /.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.