Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/find
In article <20051022071528.GA698%antioche.eu.org@localhost>,
Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
>>
>> That particular one is easy to fix; they appear to do something like:
>>
>> if (path ends with a slash)
>> printf("%s%s\n", path, rest);
>> else
>> printf("%s/%s\n", path, rest);
>>
>> But that is a special case, it is not path normalization which they don't do.
>> They are not really trimming trailing slashes or anything. We can do the same
>> too.
>
>In this example, if /usr/share is a symlink pointing to some other directory,
>find /usr/share/ will follow it, while find /usr/share will not:
>baladeur# cd /tmp/
>baladeur# ln -s /usr/share .
>baladeur# find /tmp/share -name Berlin
>baladeur# find /tmp/share/ -name Berlin
>/tmp/share//zoneinfo/Europe/Berlin
>
>Stripping the trailing slash in find may cause a change in behavior in this
>case, but I don't know if it's a real problem or not (find /tmp/share/. would
>still work ok).
I am not stripping any trailing slash, I am just not printing an extra one
if one exists.
christos
Home |
Main Index |
Thread Index |
Old Index