This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

If you've got a junction point (let's call it JUNC, located at
c:\example\junc ) and a real folder TARG (located at c:\example\TARG )
and your junction point points to TARG:
cygpath -w /cygdrive/c/example/junc
will give you
c:\example\TARG
as your output instead.

This leaves cygpath completely unable to translate the original path
of an NTFS junction.  This is proving to be a problem for me (I'm
trying to use the output of cygpath for the equivalent of a backtick
operation in another script...)

Variations on this produce similar results, for example
cygpath -w /cygdrive/c/example/junc/subfolder
will give you
c:\example\TARG\subfolder

However, the reverse (win to nix) works fine:
cygpath "c:\example\junc"
gives you
/cygdrive/c/example/junc
without the faulty translation.

Interestingly enough, cygpath does not normally seem to care whether
or not a folder really exists.
cygpath -w /cygdrive/c/thisdirisnotreal/blah
will give you
c:\thisdirisnotreal\blah
even if "thisdirisnotreal" doesn't exist in the filesystem.  It is
only in this special case that cygpath seems to care what is really in
its path.

I haven't taken a look at the C source yet, so I'm not sure whether
this problem lies in cygpath itself or the cygwin API layer.

-Pierce Morton

Attachment: cygcheck.out
Description: Binary data

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]