delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/23/20:10:39

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FSL_RU_URL,KAM_THEBAT,TW_YG
X-Spam-Check-By: sourceware.org
Date: Wed, 24 Nov 2010 04:09:16 +0300
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <999310079.20101124040916@mtu-net.ru>
To: Pierce Morton <pierce DOT c DOT morton AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: cygpath unable to translate the *nix path to an NTFS junction point
In-Reply-To: <AANLkTik5e=pvzaqW+Rxq33NQu1AyaAq3uLmZD3Cb8s5N@mail.gmail.com>
References: <AANLkTik5e=pvzaqW+Rxq33NQu1AyaAq3uLmZD3Cb8s5N AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Greetings, Pierce Morton!

> 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 is expected behavior for cross-links.
However, the real reparse points mounting different volumes...

[C:\]$ uname -a
CYGWIN_NT-5.1 daemon2 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
[C:\]$ dir C:\ | grep arc
2010-11-22  12:16    <JUNCTION>    arc

[C:\]$ cygpath -w /c/arc
C:\arc

Real junction target: \\?\Volume{4aee6480-972b-11de-b8ca-0015f2ef1bb5}\arc

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

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

Say, it's a missing feature.

@Corinna: Any chance cygpath get a --nofollow switch or something?


--
WBR,
 Andrey Repin (anrdaemon AT freemail DOT ru) 24.11.2010, <3:48>

Sorry for my terrible english...


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