Symlink targets dereferenced when winsymlinks:native
Corinna Vinschen
corinna-cygwin@cygwin.com
Sun Nov 29 17:10:00 GMT 2015
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 don'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 path.
> >>
> >> Can you confirm?
> >
> > 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.
> >
> > I fixed that in the repo and created a new developer snapshot for
> > testing: https://cygwin.com/snapshots/ Please give it a try.
>
> I get relative symlinks in all of my test cases now. Thanks.
Cool, thanks for testing.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151129/bd038746/attachment.sig>
More information about the Cygwin
mailing list