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]

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

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.

For example, on my main workstation, I have an SSD primary drive for
booting and critical applications, and a larger mechanical drive for
bulk storage. To make this combination work well, I use junctions
extensively in order to allocate subtrees of the C: drive (an SSD) on
the mechanical drive. Since many Windows application installers don't
give a choice of installation directory, and even when they do they
frequently carve off large chunks of C: for shared files and other
purposes, junctions really are the easiest way of doing it. I frequently
post-process installation trees by choosing large directories to hive
off to bulk storage, and even have a script to automate the procedure.

Unfortunately, this extensive use doesn't work well with Cygwin treating
those junctions as symlinks. Things like 'cp * ../other-dir' will break
if the current directory is a junction; and 'cygstart .' will open up
the directory in Explorer, except in the wrong tree.

So I wrote this modification to cygwin-1.7.7-1 which adds a new option
to the CYGWIN environment variable, "junctionlinks", which defaults to
true (the current behaviour). By adding "nojunctionlinks" to CYGWIN,
treating junctions as symlinks is disabled.

-- Barry


Attachment: cygwin-1.7.7-1_junctionlinks_opt.patch
Description: Binary data

Problem reports:
Unsubscribe info:

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