This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange cygpath behavior.

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

>  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.

 Andrey Repin ( 26.06.2011, <19:51>

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]