delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/07/10:36:01

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=Jh02Ou71JqOwZ3Qc
RlcqW+60zaHFHuFku6L1Vg0pcsQK0a/M5wgECl4LWzPmGWD6LYi4l44GY+Urew+N
S03qDHyw5o/mb29FJWuI5B6focpx2Nz5Rf5lJWfjrQUJ4sUVjDg/wJA/d0azyamM
bckvIDlzZGKDDHWymCGcgDLY3pQ=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=i/10ZCGfMqyeZgWb09ZcDb
em1ao=; b=gTqOWUvANlhVev3r1knZxxHSFG/SHh0SfQ/Ow77Rst5hUkXTpX7Wlp
R8GLIZBSS9ZCVQOlwT9jqpdbzSngm9KEhrTfszMGvCsGz9eQswVrruwuTiPDK5EQ
D4T6V5CnESaczJculccEs62kVDSnDCxIr152syrKblHdAwgDzfjl0=
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=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
Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Tue, 7 Feb 2017 18:30:05 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <357614277.20170207183005@yandex.ru>
To: Roger Qiu <roger DOT qiu AT polycademy DOT com>, cygwin AT cygwin DOT 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 AT polyhack DOT io>
MIME-Version: 1.0
X-IsSubscribed: yes

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

- Raw text -


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