delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/08/17:42:51

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=AaY56IsuJgUvOQ00
ErLzI2LNYowqZtm/cTPvhCI4fsi4W41gBuYBrS/LNw2j530dg7rAURHDmPl+EBxP
tQplzKHnWMoYLi5iiJfo1xNBKlttSB5MJPnb4SjYSH1UqvYsuDcmcRuF0AJjKO6X
UtBSwoAYgG6OTtTQMN+fbUd8pt8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=CQBKW62WQek4Odj89ZP+CV
f5pYA=; b=UPf1g3cwixEHpzGioAZpROFdeGZW9s45JVwkeneoB3wZ8BJiTzwo8Q
pD/IMeVreUrBrcaCsYGhNjB5R7zI1hA0iSkUYPOqDHS6S83OWwOWYZwKoSUjF5Ik
0LdadmY/9MkxlETMMhukONw24qTYAaeBVLNpgd7QAQsGCiYgXT6ZY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=exclude, UD:php
X-HELO: mout.kundenserver.de
Subject: Re: cygpath -w converts relative paths to absolute windows paths
To: cygwin AT cygwin DOT com
References: <10eb657d-a00b-1609-a9b9-6373092c1ac1 AT polyhack DOT io> <357614277 DOT 20170207183005 AT yandex DOT ru> <eecf1899-0aa3-6344-b88c-e5fe9e01bc90 AT towo DOT net> <1995347138 DOT 20170208135417 AT yandex DOT ru>
From: Thomas Wolff <towo AT towo DOT net>
Message-ID: <f1e11933-c45d-aec8-6720-0809265729d6@towo.net>
Date: Wed, 8 Feb 2017 23:42:23 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <1995347138.20170208135417@yandex.ru>
X-UI-Out-Filterresults: notjunk:1;V01:K0:t4V8ehUBtzk=:ahiuVYjYWAG0sHdV4MeEFq ZTAhML6ULS7MVz9Sfqy1RIcSJ7GJi/1aX8ZEfWm3pbvEhtofP9KRULwikLbI7YvEYkwmcuztJ vSFU1h3VZ19sWY0Tauy3NZZutKMpRr7/pfReHNy5485kIGQctzhK545UMoPOeW8O/h+TPfUJ0 0pwcwbrh0YWB7g53rCo6eYSPFO3wkO1vIN2tFAsISMdhAbpeBC9mh5WkxCBL1vFP2qeFQVLJp 7A0WCmaOIzomrBX2ifcMufNNAbgclUawqkaQXFyAJNhogZgMMRziv91w9ZBmx+VpA8YKd6MC1 flyKdcaBGz0FiY/7ntL2QHmxeOK1yl56dCeQGD0OCXrITCKBLbTeyJGSc1mnB0bTIno9mNvKx aaIIzR/QsQICPG8i3CaUM4SXe6zGy3qN5zUJrwq5ASgRlgqRPZAxH0AJI6WcDsV1Re0VfsOQz wfi7i/6xosxgX8jhgn8hT2Heeerc2RTMDXENRL3loej1LP1TEz2BHHlGruz+HjxRbh038h1wo qRXlr/T0yyBWozH2mDSg0Khqn3oIr64BF64GyfcvbJKN22IkC1TRoQHbLdtHGYfhNGFW9WhYt rONw8TRhxc0tI1/4dxz2055sSTGC6hjQ9Dyagbk16Q9ByVtbJdv0xBaOXXP8NgVW77GDyfBas 735h3vPH1kfWkw+u+MwLBZj04BnFNnfVe4Rm1jfobatlUmmZpqJMNziWfVZZ9JHtV6Vm1tQCc 2tIP4bLINoqBx/Pf
X-IsSubscribed: yes

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 
".." 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).
------
Thomas

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019