delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/11/16:28:08

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=WApr1yFgjyZcjtdL
8ASHxFMw5t5Z9tlg1DTrZ1xTzjeFXyB1ScCaNiQYe/7LmXpxMWHdjJjxQm9ukFrx
mn1O9B5u44DwLGlAgmh9uKPOKO4Mgr4pmva3m70mZR9v2SyTfGAhrAVhMqhM/Bcf
0ouLQc8l44bhUK0JcUFyT5o54Es=
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=OG8ws2J0t0+uA5LS2wD7g3
ndvEE=; b=sqZ9qQbJ1Yohb4UkO3R6Usl6G88gbzOY9KIm7rSmZ+lDKdRVO667Qn
JEOlZ2KooeAjmeeB4sjvoh93FD+q7s+cwupT4fZzYfIXLwUMEux7hncWDgjtPKqC
QkDte6f6RPvzBPCpQmbSDPWqcfLk0/58P7WF8gbo14EcvINKwVS7M=
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=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=cyg, relative, Qiu, predictable
X-HELO: mail-it0-f41.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=deAEVy6WVMAe4S+OsAFTiZsPZvzQKx1HXKvszYFJrZ0=; b=gMP4meaTBhfwwF3cQEKU+JBvIC7/8BUP7FaE+vd0xXttb5r2gnWzWPVHoiB6ykujUs N69CO0r71m58iFocOpq1Wjk9iv0EkzaIN0OyB4UGT91csOz+ZbR7sXpOZkL1pKHwxDft 9cmQVo1HVRPP2jaz75wt0uSqi+uDGKbvT3zPcCKcqmzralb6jo0RuTlW95Pcrv9kivDR yPxS4khz+/jQCXN6ghAfsA0SaaV9GLFIesHdy559cQWgwKERO4gFnCywfPgxalclU3iN ghjQa2EKtPKVGRVhSK5aaLLkkruUdu8cp+my53fsEocm4qDVi3uTXnlbB3DYqdF7PwqE neMQ==
X-Gm-Message-State: AIkVDXI9POR8eM+FGv7sEPLgaLrKdILI8NJjN2YLptCBJs7xBQwL2shciRCzE6FVTf8GRQ==
X-Received: by 10.36.116.7 with SMTP id o7mr35024237itc.31.1486848471441; Sat, 11 Feb 2017 13:27:51 -0800 (PST)
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> <f1e11933-c45d-aec8-6720-0809265729d6 AT towo DOT net>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <14c8207e-0edd-a04a-6aeb-bd7f33d74a7f@gmail.com>
Date: Sat, 11 Feb 2017 16:28:09 -0500
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: <f1e11933-c45d-aec8-6720-0809265729d6@towo.net>
X-IsSubscribed: yes

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

- Raw text -


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