[darcs patch] filepath: normalise trailing dot

Isaac Dupree ml at isaac.cedarswampstudios.org
Wed Dec 1 07:03:40 CET 2010


On 11/30/10 23:59, Conrad Parker wrote:
> Hi,
>
> I've re-opened ticket #3975 related to this proposal.
>
> It's a fairly minor patch which ensures that filepaths containing a
> trailing dot are normalised consistently, ie. the path "foo/bar/." is
> normalised to "foo/bar"

Normalize to "foo/bar/" so that it still forces to resolve symlinks and 
yield a directory.  For example, lstat(), -- you can see the difference 
by shell `stat foo/bar/` and `stat foo/bar` when bar is a symlink -- or 
unlink()/rm.  (Or when bar is a plain non-directory file: 
slash-->deserved error.)  I'm not aware that removing the dot itself has 
any effect here, though. (counterexamples welcome).

-Isaac



More information about the Libraries mailing list