Symbolic link bug in recent Cygwin DLL build
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Apr 21 08:08:33 GMT 2020
On Apr 21 00:15, Mark Geisert wrote:
> Corinna Vinschen wrote:
> > On Apr 16 20:10, Mark Geisert wrote:
> > > [...]
> > > none / cygdrive binary,posix=0,user 0 0
> > > [...]
> > git log --grep symlinks d2e0b65a7fdc..HEAD >
> > > Does that string replacement need to be skipped in this situation of "empty"
> > > cygdrive prefix? Or is it something more subtle?
> > [...]
> > $ ln -s /cygdrive /tmp/cygdrive_symlink
> >
> > That also allowed the conversion cygdrive prefix to /mnt without having
> > to look for the drive letters. Now, with the cygdrive prefix being /,
> > the first path component has to be checked for being... what?
> >
> > - Just check for a single letter from a to z? That would also wrongly
> > catch /x if /x is a real subdir in the root dir.
> >
> > - Check for an existing drive letter from a to z? That would break
> > the symlink conversion on the WSL side if the symlink was supposed
> > to be created pointing to, say, an USB thumb drive which was not
> > plugged in at the time of the symlink creation.
> >
> > - Just skip any /mnt prefix if the cygdrive prefix is /? That would
> > make all drive letter paths incompatible with WSL, and in contrast to
> > /mnt symlinks, it does not autommagically "fix" drive letter paths
> > if you ever change your cygdrive prefix, which is a neat side-effect
> > of the new symlinks, IMHO.
> >
> > I'm leaning towards solution 3.
>
> That seems OK to me but I don't have much depth of experience about possible
> downsides. If it was instead decided that we need to require a "/path" for
> a cygdrive prefix in /etc/fstab I would just go back to creating symlinks
> like /c -> /cygdrive/c like I did long ago.
We can't do that these days without breaking lots of installations
already using this prefix.
> You want I should submit a patch for solution 3?
No, the patch is really simple and I already have it in the loop.
However, to get the full functionality it might still be a good idea to
change the cygdrive prefix to something else(*) and use symlinks to
/proc/cygdrive/X in / instead.
Thanks,
Corinna
(*) Funny enough I'm using /mnt as cygdrive prefix for ages... which
means, I had to change it to something else first, otherwise I
wouldn't have been able to test if the WSL symlinks are doing the
right thing in terms of cygdrive prefix translation...
--
Corinna Vinschen
Cygwin Maintainer
More information about the Cygwin-developers
mailing list