delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Tue, 23 Nov 2010 10:55:29 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: cygpath unable to translate the *nix path to an NTFS junction point |
Message-ID: | <20101123095529.GZ18309@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <AANLkTik5e=pvzaqW+Rxq33NQu1AyaAq3uLmZD3Cb8s5N AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <AANLkTik5e=pvzaqW+Rxq33NQu1AyaAq3uLmZD3Cb8s5N@mail.gmail.com> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
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 |
On Nov 23 12:34, Pierce Morton wrote: > 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 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...) Sorry if I don't get your problem. The resulting path is correct, isn't it? Cygwin handles junction points as symlinks. When creating a Windows path, symlinks get resolved, since native Windows applications (the target audience for cygpath -w) don't understand symlinks. > However, the reverse (win to nix) works fine: > cygpath "c:\example\junc" > gives you > /cygdrive/c/example/junc > without the faulty translation. "Faulty" is a bit harsh, isn't it? The target audience for `cygpath -u' are POSIX apps which *do* understand symlinks, so it's not necessary to resolve them. > Interestingly enough, cygpath does not normally seem to care whether > or not a folder really exists. > cygpath -w /cygdrive/c/thisdirisnotreal/blah > will give you > c:\thisdirisnotreal\blah > even if "thisdirisnotreal" doesn't exist in the filesystem. Sure. Otherwise it's not possible to create DOS paths from POSIX paths for yet-to-be-created files. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |