This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in cygpath -a handling of leading ".//"

On Nov 26 02:42, Vadim Zeitlin wrote:
>  Hello,
>  I seem to have a special talent for finding problems related to the
> handling of doubled consecutive slashes in cygpath, as 5 years after
> posting my previous bug report on this topic (see
>, I have another one
> which is also best shown with an example obtained with the latest Cygwin
> 2.6.0 version under Windows 7:
> 	[~]% cd /tmp
> 	[/tmp]% mkdir dir
> 	[/tmp]% cd $_
> 	[/tmp/dir]% cygpath -a ../dir
> 	/tmp/dir
> 	[/tmp/dir]% cygpath -a ./../dir
> 	/tmp/dir
> 	[/tmp/dir]% cygpath -a .//../dir
> 	/tmp/dir/dir
> The last one is, of course, incorrect, as it should still output /tmp/dir.
> Notice that the problem doesn't happen if "-am" or "-aw" is used, only for
> "-a" on its own, so it does have a simple workaround: realpath can be used
> instead. But I still wanted to report it in the hope that it might at least
> help somebody else if they run into it (it took me quite some time to
> realize that the bug wasn't in my own makefile but rather in cygpath
> itself...).
>  Please let me know if you'd like me to provide any further information and
> thanks in advance for looking at this,

I could easily reproduce the problem and pushed a patch to the repo.  I
uploaded a new developer snapshot to,
please give it a try.  I guess a 2.6.1 bugfix release is due soon.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]