X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=4.7 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:57:50 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <48666308.20110626195750@mtu-net.ru> To: Peter Rosin , cygwin AT cygwin DOT com Subject: Re: Strange cygpath behavior. In-Reply-To: <4E063FBF.8040103@lysator.liu.se> 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> <4E063FBF DOT 8040103 AT lysator DOT liu DOT se> 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, Peter Rosin! > cygpath, at its core, calls some form of the cygwin_conv_path API. That > function takes either a POSIX path or a Win32 path and converts to the > other form. Anything interesting or useful that's happening when feeding > it a Win32 path and requesting it to convert from POSIX to Win32 is > purely coincidental and should not be relied upon. Right you are. But as I converting _to_ *NIX form, I should not suffer from issues, or at least not as long as the target of conversion is a cygwin utility. > It you don't have a > desire to revisit your code later on and fix any breakage, that is... I don't. I code it with assumption that it could break, and if it will - i know where to look first. :) > (However, I'm not the cygpath author, but the src is readily available) Sure, I just don't know any of the C family languages enough to crawl through code for my answers. But I trust your explanation. > The fact that cygpath is not good for one-shot conversions from a Win32 > path to some other form of Win32 path appears to not be explicitly > documented. But you should get the dos-file-warning if you try, which > should be a good hint that you are in murky waters. I've it disabled :P DOS file name warning popping up for cygpath trying to convert DOS-style name to UNIX style is somewhat... useless. -- WBR, Andrey Repin (anrdaemon AT freemail DOT ru) 26.06.2011, <19:51> 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