On Wed, Sep 30, 2009 at 06:07:29AM -0600, Eric Blake wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >My testing on rename found another corner case: we rejected >rename("dir","a/./") but accepted rename("dir","a/.//"). OK to commit? > >For reference, the test I am writing for hammering rename() and renameat() >corner cases is currently visible here; it will be part of the next >coreutils release, among other places. It currently stands at 400+ lines, >and exposes bugs in NetBSD, Solaris 10, mingw, and cygwin 1.5, but passes >on cygwin 1.7 (after this patch) and on Linux: >http://repo.or.cz/w/gnulib/ericb.git?a=blob;f=tests/test-rename.h > >2009-09-30 Eric Blake <e...@byu.net> > > * path.cc (has_dot_last_component): Detect "a/.//".
No, I don't think so. I don't think this function is right. It shouldn't be doing a strrchr(dir, '//). And the formatting is off slightly. Is this function supposed to detect just "." or "*/."? cgf