delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/05/01:27:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=UEaTdMcNtfRU1xMXn/cUyzJwRluYR4X1t/WAaH8N9Bm
hZr79rfPaWPLhlpa7ABtSbQbD0hbZ9ZD1yADqD2Z28eSZKcZcP3FkxcmKlUetzBb
aXTX20sq2gVOhbo2ZU9bebIEVrgAE6zbO+uIK6WVnUM5H8YxHkMeBKvKPkTjWxU4
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
s=default; bh=nFmOlWgKbcihQw1zblfS4/v1Mrk=; b=SY8P0EmfvyWZ/n6gY
/n+ov8eXJdJMbHMonYtyjbeIboET6JO5uDXz9eojWPXC6+dGs8ZjaZpwDlIron3g
7rpPaif1fAZ3X+8KvFXHIkK+Jz6B2YnUYSHNW02Zl4pW4EpbLsgbKMkTleX4gQ6z
U+y5dFC6fhrFNZuGTH/ogfwvj4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: Yes, score=5.7 required=5.0 tests=AWL,BAYES_50,DOS_OUTLOOK_TO_MX,SPF_PASS autolearn=no version=3.3.2
X-HELO: li162-68.members.linode.com
From: "Andras Nagy" <nagya AT nagya DOT net>
To: <cygwin AT cygwin DOT com>
References: <000101ceee5c$0808a7f0$1819f7d0$@nagya.net>
In-Reply-To: <000101ceee5c$0808a7f0$1819f7d0$@nagya.net>
Subject: absolute native symlinks vs file explorer on windows 8.1
Date: Wed, 4 Dec 2013 22:26:32 -0800
Message-ID: <000601cef182$f0f602e0$d2e208a0$@nagya.net>
MIME-Version: 1.0

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.

Questions:
- 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.)

cheers,
Andras


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
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019