Date: Sat, 23 Jun 2007 08:20:06 GMT From: "Ighighi Ighighi" <ighighi@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/107515: ls(1) bug Message-ID: <200706230820.l5N8K6ZJ037539@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/107515; it has been noted by GNATS. From: "Ighighi Ighighi" <ighighi@gmail.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/107515: ls(1) bug Date: Sat, 23 Jun 2007 04:13:19 -0400 Bruce Evans wrote: > I think it is a bug in fts(3) for fts_path to be empty. The empty > pathname is never valid, and the error is for the directory. Apparently, > fts(3) reduces /tmp/a/ to the invalid basename "", but does the right > thing for /tmp/a. Well, there's a 2 years old patch in OpenBSD applied in the same place as yours, titled "use fts_path if fts_name is not available", so it seems there are cases where fts_name could be "", the code in fts.c is theirs after all. Check: http://www.openbsd.org/cgi-bin/cvsweb/src/bin/ls/ls.c.diff?r1=1.22&r2=1.23 http://www.openbsd.org/cgi-bin/cvsweb/src/bin/ls/ls.c Maybe it's time to patch this one.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706230820.l5N8K6ZJ037539>