delorie.com/archives/browse.cgi | search |
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:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=ohc7+auRFO7xh7ZOHA2tpuH4wONoFnbILLvFffTKw6sKaC7Kbnbcn | |
gCVVgulzXKMhyCPSEO53JHK6Q4q35B8KOQP5hgQgx4X8sN8xJUb5avJjRfo6CCTF | |
bAlTOzIoK5wmu+W7kLJbcXp033oCLIoRX65QAdCxMYlaCjBl0u6OtM= | |
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:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=N5ctWkjp10vP6vwclN+gS/W0f+E=; b=fKHjNnj7pUIIHgKccwbbkLy0mh/2 | |
XhD7T0SVkIKSNoIemTmrcbfqhYWguzxJPeNf/s7M/ACHQqtnNmZDb4E2/ezFbNpp | |
fsSmTgAarmp54H/UH/VlMz/X5c4YSXVNvRySC4iQ9rrd12RrbF8IhCofTQ+CxumJ | |
cSkzHduA/5E57U8= | |
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=-101.6 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=how's, hows, Hx-languages-length:1725, H*MI:sk:6055a8e |
X-HELO: | drew.franken.de |
Date: | Mon, 13 Feb 2017 16:16:14 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: cygpath -w converts relative paths to absolute windows paths |
Message-ID: | <20170213151614.GA25846@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <10eb657d-a00b-1609-a9b9-6373092c1ac1 AT polyhack DOT io> <20170212112314 DOT GE11666 AT calimero DOT vinschen DOT de> <6055a8e1-bfd7-16c7-f25a-e02523863fdd AT towo DOT net> |
MIME-Version: | 1.0 |
In-Reply-To: | <6055a8e1-bfd7-16c7-f25a-e02523863fdd@towo.net> |
User-Agent: | Mutt/1.7.1 (2016-10-04) |
--82I3+IH0IqGh5yIs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 12 18:38, Thomas Wolff wrote: > Am 12.02.2017 um 12:23 schrieb Corinna Vinschen: > > On Feb 7 14:35, Roger Qiu wrote: > > > Hi, > > >=20 > > > I've found that `cygpath --windows '../` will give back an absolute w= indows > > > path. > > >=20 > > > I thought this would only happen if you provide the `--absolute` flag= , or > > > when the path is a special cygwin path. > > >=20 > > > But this occurs just for normal directories. > > >=20 > > > 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. > > >=20 > > > Can `cygpath --windows '../directory'` give back `..\directory` for p= aths > > > aren't special cygwin paths? These relative backslashes are supported= in > > > Windows right now. > > Not easily. All paths are evaluated as absolute paths inside Cygwin. > > The result of the path conversion is always an absolute path. A relative > > path is generated from there by checking if the path prefix in POSIX > > notation is identical to the current working directory. If not, the > > path stays absolute. Naturally, if you use a "..", the resulting path > > does not match the CWD anymore, so you're out. > How about converting getcwd(), too, and comparing that? Converting to what? And how's that different from what I describe above? Btw., did you see https://cygwin.com/ml/cygwin/2017-01/msg00404.html? Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYoc2+AAoJEPU2Bp2uRE+gqs8P/R5w92A8Q+uKYCvR5h9cRJPW ct2Soj0dw+eKQYRyW7Fc323zHd3IhiHT7ng6nmyG/+sdSdmJ4Qs3iCMfFxgBbvNO QPLm6NEfMdgdbHDexSz+gfataTtgp8GVXMBAgJaMoxn1EXYTeUefDz0EA5PYmKOf wFWEd1GOfSURD40t8vYJuG1LmYkbHRDZaN0dxKZ46PYo12RX32jZwCoOKhIOoH7B /XxQJr8geMCIvs5H7vngUlbULf2AYvt1uxnbhYvQqsdD9/rdjqiTIfGc9ECIcgwY T3zAmKdJ1dnge/2sP4K3k0Xw8UaOfC0A9STLeOn3SWrzlrW2TdrehC7rtT0tjEbh QB32tB4HyuxjKdBdZnbJ4uJb50KRplzP3laykHyoyVqxjR+DXlK6owIW8xej5JT1 g4iPov3GGqUZZWVJ+N/uadGNNKr7aMedv3V727iJ3qC7CuMIotf6G1qFi/VKQFWV JuTi1hdG0Z6dhXqutkE1/mZkSVpp/RvgQZchoGYJqW2WArQcTK6hpOHMDRJcq84z kT3dj3SrwVFOYOIb6bDEMQKfrEHtX9oX2lXZW8OzIUxRXs9Ygh8tDLmijqNnJu5R 9RuJ5LcoHL1xurvpvroX3YxPqWMqB1KoUarEhUd7kZRyKYzHaLXpJEorff0KZRLv aOiCrIPcHFRo99aHLDtf =/4cR -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |