public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Vadim Zeitlin <vz-cygwin@zeitlins.org>
To: cygwin@cygwin.com
Subject: Bug in cygpath -a handling of leading ".//"
Date: Sun, 27 Nov 2016 01:20:00 -0000	[thread overview]
Message-ID: <E1cAS0E-000087-Ba@smtp.tt-solutions.com> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1129 bytes --]

 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
http://sourceware.org/ml/cygwin/2011-06/msg00212.html), 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,
VZ

[-- Attachment #2: Type: APPLICATION/PGP-SIGNATURE, Size: 196 bytes --]

             reply	other threads:[~2016-11-26  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27  1:20 Vadim Zeitlin [this message]
2016-11-28 19:23 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1cAS0E-000087-Ba@smtp.tt-solutions.com \
    --to=vz-cygwin@zeitlins.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).