cygpath unable to translate the *nix path to an NTFS junction point

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Jan 17 15:13:00 GMT 2011


On Jan 17 02:48, Barry Kelly wrote:
> Pierce Morton wrote:
> 
> > I've recently installed cygwin using the web installer, and have found
> > an error in the way that cygpath translates junction point paths from
> > *nix to Windows paths when dealing with a junction point.
> 
> The issue is that Cygwin treats reparse points as symlinks. IMO, the
> more normal uses of junctions in the Windows ecosystem is not very close
> to the usage of POSIX symlinks, so this behaviour is undesirable.

We're trying to emulate POSIX in the first place.  The most important
point is that POSIX paths work, and in the POSIX sense junction points
are either mount points or symlinks.  If they point to another drive,
they are mount points, if they point to another dsir they are symlinks.
Also, if you don't treat juntions to the same drive as symlinks you have
the problem that you can easily create loops when you run a recursive
file search.

> So I wrote this modification to cygwin-1.7.7-1 

Please read http://cygwin.com/contrib.html, especially the chapter
"Before you get started".  For a patch like this we need a signed
copyright assignment.  However...

> to the CYGWIN environment variable, "junctionlinks", which defaults to
> true (the current behaviour). By adding "nojunctionlinks" to CYGWIN,
> treating junctions as symlinks is disabled.

...we won't take patches which add arbitrary options to the CYGWIN
variable which could also be solved in other ways.  In this special
case, only the conversion from POSIX to Win32 paths is affected.
This conversion is only supported by the cygwin_conv_path function
and, subsequently, the cygpath utility.  Therefore, such a change
should be restricted to this API.  I'll have a look into adding
something along these lines.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list