From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102376 invoked by alias); 8 Feb 2017 22:42:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 102366 invoked by uid 89); 8 Feb 2017 22:42:36 -0000 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 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Feb 2017 22:42:26 +0000 Received: from [192.168.178.45] ([95.91.244.74]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MTbOB-1d2Mjg3c3j-00SNWE for ; Wed, 08 Feb 2017 23:42:23 +0100 Subject: Re: cygpath -w converts relative paths to absolute windows paths To: cygwin@cygwin.com References: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io> <357614277.20170207183005@yandex.ru> <1995347138.20170208135417@yandex.ru> From: Thomas Wolff Message-ID: Date: Wed, 08 Feb 2017 22:42:00 -0000 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> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2017-02/txt/msg00113.txt.bz2 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