From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: cygpath -w converts relative paths to absolute windows paths
Date: Sat, 11 Feb 2017 21:27:00 -0000 [thread overview]
Message-ID: <14c8207e-0edd-a04a-6aeb-bd7f33d74a7f@gmail.com> (raw)
In-Reply-To: <f1e11933-c45d-aec8-6720-0809265729d6@towo.net>
On 2/8/2017 5:42 PM, Thomas Wolff wrote:
> Hi Andrey,
>
> Am 08.02.2017 um 11:54 schrieb Andrey Repin:
>> Greetings, Thomas Wolff!
>>
>>> Am 07.02.2017 um 16:30 schrieb Andrey Repin:
>>>> Greetings, Roger Qiu!
>>>>
>>>>> I've found that `cygpath --windows '../` will give back an absolute
>>>>> windows path.
>>>>> ...
>>>> ".." is a special path, that can't be safely converted.
>>> How is the special meaning of ".." so much different in Windows than in
>>> Cygwin/Linux/POSIX that it could not be mapped?
>>> Things like dir .., cd .., type ..\sub\file all work comparably.
>> Comparable? May be. Predictable?
>> https://bugs.php.net/bug.php?id=73797
> I don't know what __DIR__ is supposed to mean in PHP. Anyway, handling
It's simply a constant of the directory for the file in which __DIR__
appears. The constant has a namespace relative to the file.
> ".." is not predictable even within Linux/Cygwin, you could see
> something like:
>> ls dir1/file
> dir1/file
>> cd dir2
>> ls ../dir1/file
> No such file or directory
>
> (if dir2 is a link), or can have surprising effects of cd vs. cd -P.
> I don't see how that should exclude ".." from being transformed to ".."
> by cygpath -w, even if the result may be somewhat unexpected in some
> border cases (which I haven't seen yet).
I agree.
--
cyg Simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2017-02-11 21:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 3:36 Roger Qiu
2017-02-07 15:35 ` Andrey Repin
2017-02-07 23:13 ` cyg Simple
2017-02-07 23:34 ` Thomas Wolff
2017-02-08 1:00 ` Brian Inglis
2017-02-08 11:06 ` Andrey Repin
2017-02-08 22:42 ` Thomas Wolff
2017-02-11 21:27 ` cyg Simple [this message]
2017-02-09 1:17 ` Roger Qiu
2017-02-12 11:23 ` Corinna Vinschen
2017-02-12 17:39 ` Thomas Wolff
2017-02-13 15:16 ` Corinna Vinschen
2017-02-13 19:34 ` Thomas Wolff
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=14c8207e-0edd-a04a-6aeb-bd7f33d74a7f@gmail.com \
--to=cygsimple@gmail.com \
--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).