From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23836 invoked by alias); 29 Nov 2015 16:37:01 -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 23721 invoked by uid 89); 29 Nov 2015 16:37:00 -0000 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 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 29 Nov 2015 16:36:59 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id BB815A805E6; Sun, 29 Nov 2015 17:36:56 +0100 (CET) Date: Sun, 29 Nov 2015 17:10:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Symlink targets dereferenced when winsymlinks:native Message-ID: <20151129163656.GB2755@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <564E1AA0.6070001@gmail.com> <0D835E9B9CD07F40A48423F80D3B5A702E9519BE@USA7109MB022.na.xerox.net> <564E3C5B.10006@gmail.com> <20151120092618.GA20182@calimero.vinschen.de> <5654BFC3.9090901@gmail.com> <20151126115339.GK2755@calimero.vinschen.de> <565B0516.3000109@gmail.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) X-SW-Source: 2015-11/txt/msg00478.txt.bz2 --OlucDFihBVSxvK/7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1447 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 Content-length: 819 -----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--