This is the mail archive of the
mailing list for the Cygwin project.
absolute native symlinks vs file explorer on windows 8.1
- From: "Andras Nagy" <nagya at nagya dot net>
- To: <cygwin at cygwin dot com>
- Date: Wed, 4 Dec 2013 22:26:32 -0800
- Subject: absolute native symlinks vs file explorer on windows 8.1
- Authentication-results: sourceware.org; auth=none
- References: <000101ceee5c$0808a7f0$1819f7d0$ at nagya dot net>
I'm experiencing the following symptom with the latest 64bit cygwin on
windows 8.1: absolute native symlinks created with cygwin differ slightly
from those created with mklink; cygwin's symlinks start with a "\\?\" .
Because of this, file explorer (nee windows explorer) refuses to handle them
properly, specifically, nothing happens when I double click on such a
symlink. See exact repro below.
Cygwin exhibits the same behavior on windows 7, but windows 7's explorer
handles such symlinks fine.
- Why does the target of the native cygwin symlink start with "\\?\" ?
- Is there a way to make cygwin not add that prefix to native symlinks?
- Alternatively, is there a way to make windows 8's file explorer behave
like windows 7's explorer and tolerate such native symlinks?
(I'm am aware of the alternative involving shortcuts instead of native
symlinks, however, I'm interested in finding a fix or workaround for the
native symlink case.)
repro steps (~/v.txt exists and is a plain text file):
$ export CYGWIN=winsymlinks:nativestrict
$ ln -s ~/v.txt v1.txt
$ cmd /c mklink v2.txt "$(cygpath -w ~/v.txt)"
symbolic link created for v2.txt <<===>> C:\Users\nagya\home\v.txt
$ ls -l
lrwxrwxrwx 1 nagya None 17 Nov 30 21:42 v1.txt -> /home/nagya/v.txt
lrwxrwxrwx 1 nagya None 17 Nov 30 21:42 v2.txt -> /home/nagya/v.txt
$ cmd /c dir
11/30/13 09:42 PM <SYMLINK> v1.txt [\\?\C:\Users\nagya\home\v.txt]
11/30/13 09:42 PM <SYMLINK> v2.txt [C:\Users\nagya\home\v.txt]
$ cygstart v1.txt
Unable to start 'v1.txt': There is no application associated with the given
file name extension.
$ cygstart v2.txt
# succeeds, opens v.txt in notepad (not v2.txt, i.e. explorer dereferenced
the link and started notepad with the target)
# (By contrast on win7, both cygstart commands succeed and open v1.txt and
v2.txt respectively, i.e. there's no dereferencing.)
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple