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=q2ehs+AFhizIEq7/wT3Pva3oHBeu2WsPuveMrFc5ODMpR2uDEmubo SazoFaSgwZcPBW9637kBnMxQEmsspwlaM7iHjPQyOs+oXIX+PLpa1m2M8lxE7nen ssi1pFShg9qFhmO6T1Syr7rnop9FQ5JpODQw0z+Y+3weO3Z7keQ9vM= 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=lRL9XGsfnBhFwgIZJ2SC859Ih3A=; b=tDTP5okZ5klJZ05Mngibj98+ot0D IWrGgazaOJ7obWml+tCnC1njtJDAI51VcHXnVSm1dsfVhHEshjhw2Wolj9BNw0Rb PRBcbNzbBLIEj5Hd6CEA3+fubtdal+VtxyxdAHAzHQ+MnC2N66NOxbIQv9XwT6TU doWUImhiE+lLovc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Date: Sun, 29 Nov 2015 17:36:56 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Symlink targets dereferenced when winsymlinks:native Message-ID: <20151129163656.GB2755@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <564E1AA0 DOT 6070001 AT gmail DOT com> <0D835E9B9CD07F40A48423F80D3B5A702E9519BE AT USA7109MB022 DOT na DOT xerox DOT net> <564E3C5B DOT 10006 AT gmail DOT com> <20151120092618 DOT GA20182 AT calimero DOT vinschen DOT de> <5654BFC3 DOT 9090901 AT gmail DOT com> <20151126115339 DOT GK2755 AT calimero DOT vinschen DOT de> <565B0516 DOT 3000109 AT gmail DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OlucDFihBVSxvK/7" Content-Disposition: inline In-Reply-To: <565B0516.3000109@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) --OlucDFihBVSxvK/7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Nov 29 15:00, David Macek wrote: > On 26. 11. 2015 12:53, Corinna Vinschen wrote: > > On Nov 24 20:51, David Macek wrote: > >> My test command is `touch 1 && ln -s 1 2`, then I clean up by `rm 1 2`= . Now the results: > >> > >> in /bin/: relative > >> in /: absolute > >> in ~/ (/cygdrive/c/Users/username/): relative > >> in /cygdrive/w/: absolute > >> > >> Note that W: is a permasubst (created using `DOSDevices` in registry),= which would explain the different behaviour (but not excuse it :), but I d= on't see why / is also special. Even if only one from the link pair (target= or source) is in a relative-symlink-unsupporting path, I get an absolute p= ath. > >> > >> Can you confirm? > >=20 > > Yes, thanks for this part of the analysis. There was a typo in the > > code checking the relative paths. The check for a drive colon in the > > pathname used a wrong offset into the path string, which ultimately > > always created an absolut path to the target if the path of the > > target was in a drive's root dir or one level below that. > >=20 > > I fixed that in the repo and created a new developer snapshot for > > testing: https://cygwin.com/snapshots/ Please give it a try. >=20 > I get relative symlinks in all of my test cases now. Thanks. Cool, thanks for testing. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --OlucDFihBVSxvK/7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWWymoAAoJEPU2Bp2uRE+gzYIP/i/w430S085phb5P5SaeecRw M6gFQTX/gsy684SD+HtiDi1egBjr9tSssWw7GJRABf8hu/Bj0AHF31JZI0KIm6np 8Hp6ssXU7q1l/qtn222HrpMV+B1iyPNi87NGPzZlWh+DrB//TbFBH/7xBcmGRW2+ Rw6tBfJTacnIPGnrRbTmpPdDcDU+zHwddZYIXjeMVC6iV1Uf50mN3t0YAHB4Mr0Z zIPb938Zs4rMFZ64lN/6EtTmaTYNIsiOjwFqFSU9damtb30ink+1ZPCaPydzNDqO 59ZGtiP1oMGWNHTzlwyIY6Ow3lwvvxXHkPb2xtcp8gUEjylkli5JiLkJAP4/E4qA vy/TKljjl/DSB6GoelDBbbN/RcS+II1q+peqoFl8VKX56a+priq0qIe5dCrJjLcr zDpL+yFLurK7/TbvYwh2bCRD/vJMWcy4AalEoZd1jdAaeTKNtoWu99INehSXMUNz W4CRIyAlr4E5oTDA2SN3YsdgipTGIMjrG0tWfTW/8FCKKLCozAX7pQzE7RLoBoK8 vXh9P8TDU1nJc3jdNuwEQejSagLoKp+5X5GjIgpWlc7ZB38mgVLhlvCIzZzuKh1W Ovn388TdF6BcM+dUuO6Qe1hu2CpU4RE7FuXcOvSVumb/GX4qubl8jifvMwutk8pl hZ0OQwhTpu6/THAC9fak =S468 -----END PGP SIGNATURE----- --OlucDFihBVSxvK/7--