X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=4.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,TW_YG X-Spam-Check-By: sourceware.org Date: Sun, 26 Jun 2011 19:50:18 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <408939183.20110626195018@mtu-net.ru> To: Marco atzeri , cygwin AT cygwin DOT com Subject: Re: Strange cygpath behavior. In-Reply-To: <4E045008.7030607@gmail.com> References: <73619422 DOT 20110621092310 AT mtu-net DOT ru> <4E00321A DOT 30105 AT lysator DOT liu DOT se> <92658329 DOT 20110623165230 AT mtu-net DOT ru> <4E03492D DOT 40109 AT gmail DOT com> <1144668147 DOT 20110623190534 AT mtu-net DOT ru> <4E035F46 DOT 7000207 AT gmail DOT com> <1291997550 DOT 20110623220605 AT mtu-net DOT ru> <4E045008 DOT 7030607 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Greetings, Marco atzeri! > On Win XP cmd.exe, is not always true that the > two forms are equivalent (we are not anymore on CP/M, DOS age): C:\Temp>>cd c:/Temp > The system cannot find the path specified. This has been fixed for Vista and Win7 to my knowledge. At least last time I ran into issue with strange CMD gehavior in this regard and asked for checks on more recent systems, people reported that it was, indeed, a nonissue for them. > and if I remember correctly also somewhere else in the core of MS system > the "\" "/" are not equivalent. Only if application trying to be "helpful" and "sanitize" pathname according to some self-invented standards. Core fopen() does not care. >>> From your example: >>> cygpath -u \\\\DAEMON1\\anrdaemon\\.profile >>> /c/DAEMON1/anrdaemon/.profile >> >>> the argument is an escaped windows network path >>> and the outcome is the Unix equivalent >> >> Not true for the "outcome" part. >> >> :cygpath -w "/c/DAEMON1/anrdaemon/.profile" >> C:\DAEMON1\anrdaemon\.profile > With your cygdrive mapping /c is the disk C: so the first looks like a > Unix path and the outcome is the equivalent windows path. Yep, that was the idea. > Cygpath doesn't check if the path exist Right. But it should at least care for them being what they supposedly are. I.e. path starting from // or \\ (or \\\\ for the sake of example) is likely a network path, rather than a mistype. > From my bash shell, as cygdrive is not remapped: > $ cygpath -w "/c/DAEMON1/anrdaemon/.profile" > E:\cygwin2\c\DAEMON1\anrdaemon\.profile > $ cygpath -w "/cygdrive/c/DAEMON1/anrdaemon/.profile" > C:\DAEMON1\anrdaemon\.profile Your example is okay, it perfectly illustrates the cygwin mount behavior, it's just not related to the issue. :) -- WBR, Andrey Repin (anrdaemon AT freemail DOT ru) 26.06.2011, <19:41> 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