followup on native symlink support
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Oct 14 13:15:00 GMT 2013
Hi James,
On Oct 1 08:49, James Gregurich wrote:
> hi.
>
>
> I've been using a recent version of cygwin with
> CYGWIN=winsymlinks:native setting for daily work for some weeks. I
> haven't experienced any problems with the feature. Its always worked
> as expected. I think you made a good choice to depart from my original
> design recommendation on converting relative paths that exceed
> PATH_MAX to "\??\" tagged absolute paths.
^^^^^^^^
I assume you mean MAX_PATH, the Windows 260 chars value, rather than
PATH_MAX, the POSIX variation which is set to 4096 on Cygwin.
This isn't quite as it is implemented, actually. In fact, Cygwin will
produce relative native symlinks, if the underlying native source and
target paths of the symlink share a common path prefix. It can do so
without taking MAX_PATH into account, because, to the best of my
knowledge, the Windows implementation of native symlinks doesn't share
this relative path length restriction with the other file API calls.
However, if the underlying native source and target paths do *not* share
a common path prefix, Cygwin has no choice but to create the symlink as
an absolute symlink. Consider a POSIX path which points to another
drive via /etc/fstab. Something like
foo -> ../baz/bar
could easily translate into
C:\foo -> D:\bar
There's no way to express this as relative path.
> We have since run into some
> use cases where that caused undesirable behavior. It caused symlinks
> that were specific to particular users on particular systems to get
> committed to our repository.
>
>
> I wanted to write in to thank Corrina and the other cygwin maintainers
s/rrin/rinn/
Thanks,
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: 836 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20131014/6229dc40/attachment.sig>
More information about the Cygwin-developers
mailing list