X-Recipient: archive-cygwin@delorie.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 <anrdaemon@freemail.ru>
Reply-To: Andrey Repin <cygwin@cygwin.com>
Message-ID: <48666308.20110626195750@mtu-net.ru>
To: Peter Rosin <peda@lysator.liu.se>, cygwin@cygwin.com
Subject: Re: Strange cygpath behavior.
In-Reply-To: <4E063FBF.8040103@lysator.liu.se>
References: <73619422.20110621092310@mtu-net.ru> <4E00321A.30105@lysator.liu.se> <92658329.20110623165230@mtu-net.ru> <4E03492D.40109@gmail.com> <1144668147.20110623190534@mtu-net.ru> <4E035F46.7000207@gmail.com> <1291997550.20110623220605@mtu-net.ru> <4E063FBF.8040103@lysator.liu.se>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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@freemail.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

