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 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: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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