delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/06/22:36:39

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:from:to:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=F8r
kfYeXgS2/eewUmYtRkFpS1ORcexvRqJOd0KONqBu95IOkZYkJGL2stxDnBRSB8q/
rEwxrMsBz+4+23CPm+Xb8BVOF4Mm+z/PxhC1poy2f44nHPcI5LWfb0bHWsFxj0gF
ftdhR4NM7zeh4kVUu0k/BvZ/dzpSoL2B2Origldw=
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:from:to:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; s=default; bh=FN4+ikvKb
5kiyQAo8exRB4SB2c4=; b=P6fY2Aoff3742/BhI2Dbq/1beSMbZLMIQ+hb9IH9p
YsPya62CMZEDM5Ji/dPI7BJ/Ln+bJJjCeHuJ0123Vq1y86INO3xoo+cFfeASSiPJ
9yqM+Mb+sN+8JSSH4h0i3emWicAXTPJ860bqu7g0lW8DRPYNj73bAF//XeFgGDAW
Co=
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=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=H*M:a00b, Hx-languages-length:807
X-HELO: mail-pf0-f182.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:message-id:date :user-agent:mime-version:content-transfer-encoding; bh=0TsGaZm0c2YIWpyBy6PQ1SLesxSqfk9iR+zM4aN7mhc=; b=gUpHGl3WjMxSrcexnqHweR50boDwgDfA5AwICXCvXOXTq+rNvNFQHldmKCs3tb9FYg DuvFZSCjRjgYx4Kj75dH2fr3sCW6v9dzKtXA+fjNs0QanzV3o1GdkSFj6jqimW9yEi+x JjSILdNSagNpNu5FbX2Pjl/icfyBRBaPrToKLcANAHyNx7I0+GhB5sptlK9ntdb3VbdA gmgGkv1R3olT3d8E4Ry3z/wasrUUGcsE5SJ9aJhN4UJ28ymloAnndYBPtukStfv0pcFK G+9b4X5gKDSELp5Zugh0voHpWZjMjRtVbcGN6fbPaL9QpcEDcbTWEBN+B9AEc4u69hhY KY5Q==
X-Gm-Message-State: AIkVDXIgFQaaL4Dl9sApMCcu2oFypTIUeEVwjGv/lS/RwZRJW1ueo6aUpRvNlgwpUsGVZw==
X-Received: by 10.99.102.71 with SMTP id a68mr17596245pgc.67.1486438563254; Mon, 06 Feb 2017 19:36:03 -0800 (PST)
From: Roger Qiu <roger DOT qiu AT polycademy DOT com>
X-Google-Original-From: Roger Qiu <roger DOT qiu AT polyhack DOT io>
To: cygwin AT cygwin DOT com
Subject: cygpath -w converts relative paths to absolute windows paths
Message-ID: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io>
Date: Tue, 7 Feb 2017 14:35:58 +1100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
MIME-Version: 1.0

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.

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.

Thanks,

Roger

-- 
https://github.com/CMCDragonkai
+61420925975


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