This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: detect . in a/.//
On Sep 30 11:24, Christopher Faylor wrote:
> 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 <ebb9@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, '//).
How is it supposed to find the last path component?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat