From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56923 invoked by alias); 7 Feb 2017 15:35:48 -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 56883 invoked by uid 89); 7 Feb 2017 15:35:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*M:yandex, H*UA:Bat!, H*F:D*yandex.ru, qiu X-HELO: forward2h.cmail.yandex.net Received: from forward2h.cmail.yandex.net (HELO forward2h.cmail.yandex.net) (87.250.230.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 15:35:37 +0000 Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward2h.cmail.yandex.net (Yandex) with ESMTP id 8ADB420C6F; Tue, 7 Feb 2017 18:35:34 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id EE2075080C84; Tue, 7 Feb 2017 18:35:33 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id aXc0Kb0rWl-ZW6OTR2j; Tue, 07 Feb 2017 18:35:32 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Tue, 07 Feb 2017 15:30:05 -0000 Date: Tue, 07 Feb 2017 15:35:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <357614277.20170207183005@yandex.ru> To: Roger Qiu , cygwin@cygwin.com Subject: Re: cygpath -w converts relative paths to absolute windows paths In-Reply-To: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io> References: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00094.txt.bz2 Greetings, Roger Qiu! > Hi, > I've found that `cygpath --windows '../` will give back an absolute > windows path. > I thought this would only happen if you provide the `--absolute` flag, > or when the path is a special cygwin path. ".." is a special path, that can't be safely converted. In all cases, using absolute path is preferred for many reasons. > But this occurs just for normal directories. > I have come across a situation where I need to convert ntfs symlinks to > unix symlinks and back. Sometimes these symlinks have relative paths > them. Now by using cygpath --windows, I get back absolute paths, which > means the integrity of the symlink isn't preserved. > Can `cygpath --windows '../directory'` give back `..\directory` for > paths aren't special cygwin paths? These relative backslashes are > supported in Windows right now. AFAIK, Windows do not support relative junction points. -- With best regards, Andrey Repin Tuesday, February 7, 2017 18:27:52 Sorry for my terrible english... -- 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