delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/05/04:51:06

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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=PN+KmgUzOV/kA2nfCJGMNsYc4MvqaWyOlOSH5lYo9AaAaqd0Ywtos
KBsxlJp5AttRs/2FCvtVUa5duegFwfuGv0ydlgnR5nIkp1arce4dB73XkvbtEfCV
21DK9PXtcImGRkexwXqcv47Sl3Ch3sqgNbqKJvsoIWwLc4dhpItjGU=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=5HMxTn5+LKHdcOrR+qJdHMxCTKQ=; b=Z4nd65JdqvxYARwXHqZgV2pAY6lb
snHM+Z/ydbYeuH1fbBjWWZzFw+sg32Fkr9zC6OGDuk8z/6pVQ88OlHwfhfX4eMJX
/9Ze4c4dEryYRcmSiDBMCOi3XNueMhKmiO4EsSyGP1HanoisHxlM5NTWKQ2ZUpTx
Yx8tK0F0129BLVU=
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: No, score=1.1 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 5 Dec 2013 10:50:39 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: absolute native symlinks vs file explorer on windows 8.1
Message-ID: <20131205095039.GA17249@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <000101ceee5c$0808a7f0$1819f7d0$@nagya.net> <000601cef182$f0f602e0$d2e208a0$@nagya.net>
MIME-Version: 1.0
In-Reply-To: <000601cef182$f0f602e0$d2e208a0$@nagya.net>
User-Agent: Mutt/1.5.21 (2010-09-15)

--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Dec  4 22:26, Andras Nagy wrote:
> 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 t=
hem
> properly, specifically, nothing happens when I double click on such a
> symlink. See exact repro below.
>=20
> Cygwin exhibits the same behavior on windows 7, but windows 7's explorer
> handles such symlinks fine.

It also works fine on Windows Vista and Windows 8.  This is most
certainly a bug in Windows 8.1.

Cygwin uses the official OS function CreateSymbolicLinkW[1], which
handles the \\?\ prefix and thus long pathnames just fine.

CMD and the rest of the Windows 8.1 OS handles symlinks with long path
prefix correctly (try: cmd /c type v1.txt).  Only the ShellExecuteW
function seems to be broken now.

> Questions:
> - Why does the target of the native cygwin symlink start with "\\?\"  ?

Long path prefix[2].

> - Is there a way to make cygwin not add that prefix to native symlinks?

No, because it always worked so far.  We were not aware that Micorsoft
broke this functionality on Windows 8.1.

> - Alternatively, is there a way to make windows 8's file explorer behave
> like windows 7's explorer and tolerate such native symlinks?

This question you have to ask Microsoft.

We could workaround this in the next Cygwin version at least for short
paths < 260 chars by omitting the \\?\ prefix in this case.  It wouldn't
be the first OS bug we have to workaround, but it's kind of annoying
even so.

I'm going to discuss this bug in the Microsoft forums[3], maybe it will
get fixed in upcoming versions of Windows again.  I don't think we will
ever see a fix for 8.1, though.


Thanks,
Corinna

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa363866%28v=3D=
vs.85%29.aspx
[2] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=3D=
vs.85%29.aspx#maxpath
[3] http://social.msdn.microsoft.com/Forums/en-US/073d02a6-1181-4694-9e50-d=
6a05bd80663/shellexecutew-w-symlinks-broken-on-windows-81?forum=3Dwindowsge=
neraldevelopmentissues

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--yrj/dFKFPuw6o+aM
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBAgAGBQJSoExvAAoJEPU2Bp2uRE+gaBcP/1DV/lZ0kA3cRyNSUxbDnVSZ
y5E5IDta3y2Sc5iieEIA+H9qbsifEdAbmOzdQQde86QJ0JwM8TzkmHNZGA66TxTn
ySm42m7alRrRiPbME47sCvWJ7XYUigbNo2gSaRgX1IngSCCRltLNvzONqCKytmZ/
emYKXi8Zg0zPvDAQvYlzNQKCPgGje+TWkl/Q0y5IMskkDI5+XCTjh7+eqbLr9Hos
PvUlScs+iYbTmkolYScXgWcUKK2dGs4mwa0NhHYrlsbOmdJ7cyo7TN7Yo4FmncSJ
Ft6JrnD+30HwJShbvehMpACfiqfE2x5Tvj6JI35kFlKBXVfrWbuwQu+R0wVzV/vz
rX0ha4EWeQL0D4IY32m25pDf5xZR6R/NTnogv81VXI9dxhwZMspAMEYaDLNK2aaC
YzWhVQRbui/1WpxeWKUgwo9eDqPHK9q79ZpVYSqUp4lYZ7BcnrSNWwfTGCqsXa3Z
t7kifEXovDXTsc57ZH0QwCq+K+J+HkEaJjEe5AbvBWPCTVuFn4nWZs/m+krmGXDL
HCb4VxctRA4ND+3Ga4CrzfPfhZHHnWMjkO/0f+qJQUZSESYfIGdeMdZjocZq/RGE
vakvTsYEOqcmtW/bayhUT165BW0ZKyweHEzycDb2wE/5+NvR3yDXV39GuLC2VrqS
76XZVBDFNRr6Rzl53yN3
=GzU5
-----END PGP SIGNATURE-----

--yrj/dFKFPuw6o+aM--

- Raw text -


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