Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/find



On Wed, Oct 19, 2005 at 01:38:01PM -0500, James Chacon wrote:
> On Wed, Oct 19, 2005 at 02:23:45PM +0200, Quentin Garnier wrote:
> > On Wed, Oct 19, 2005 at 12:17:22PM +0000, Elad Efrat wrote:
> > > 
> > > Module Name:      src
> > > Committed By:     elad
> > > Date:             Wed Oct 19 12:17:22 UTC 2005
> > > 
> > > Modified Files:
> > >   src/usr.bin/find: main.c
> > > 
> > > Log Message:
> > > Strip trailing slashes before using the path.
> > > PR/31869.
> > 
> > That's completely bogus.
> > 
> > find /
> > find /somedir/ /someotherdir/
> > 
> > clearly don't work as expected.  Please back this out.
> > 
> 
> Yeah, blindly stripping all /'s off until you find something else isn't
> the way to go.
> 
> (and this code underflows with just "/")
> 
> I agree stripping extraneous /'s off makes sense but do it sanely. (and add
> a regress test)

Back in the recesses of my mind, I filed a bug in 1985 - in what was
to become comp.os.bugs.4bsd - in that find(1) didn't do the right
thing when it was given a symbolic link on the command line as one of
its starting directories.  The obvious way to search through a tree
which is pointed at by a symbolic link is to append a '/' to the sym
link (rather than have it just silently fail to traverse through the
symbolic link).

So I disagree completely - stripping off trailing '/'s does not make
sense to me at all.

Regards,
Alistair



Home | Main Index | Thread Index | Old Index