This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: detect . in a/.//
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 30 Sep 2009 11:24:38 -0400
- Subject: Re: detect . in a/.//
- References: <4AC34A01.4070509@byu.net>
- Reply-to: cygwin-patches at cygwin dot com
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, '//). And the formatting is off
slightly.
Is this function supposed to detect just "." or "*/."?
cgf