Strange cygpath behavior.
Thu Jun 23 18:20:00 GMT 2011
Greetings, Marco atzeri!
> On 6/23/2011 5:05 PM, Andrey Repin wrote:
>> Greetings, Marco atzeri!
>> Cygwin, to my best understanding, is supposed to transparently accept native
>> Windows paths.
> No, cygwin expects to receive POSIX/Unix paths
> $ cygpath -h
> -u, --unix (default) print Unix form of NAMEs
> so cygpath -u
> expects to receive a Windows path and convert it in a unix one.
That's your assumption. Which is not necessarily true. (Unless you're author
of cygpath, in which case you have full authority to tell me what it is
supposed to be.)
Man page and reference card both do not specify the exact argument format,
only the intended result format.
And just to be clear, windows in the core don't see a difference between the
path in format of "C:/whatever/..." or "C:\whatever\...".
This behavior is very, very old. Even older than Windows itself, if you know,
what "INT 21h" means.
> From your example:
> cygpath -u \\\\DAEMON1\\anrdaemon\\.profile
> the argument is an escaped windows network path
> and the outcome is the Unix equivalent
Not true for the "outcome" part.
<stdout>:cygpath -w "/c/DAEMON1/anrdaemon/.profile"
Which is far from original network path.
> As Corinna explained:
> $ echo \\\\DAEMON1\\anrdaemon\\.profile
I already said that I'm sorry, that I forgot to mention what seems to be
critical bit of information.
> By the way resetting "cygdrive" is not a good idea,
> it is better to obtain
To tell you, that was actually a good idea for me. I don't have an eternity to
type "/cygwhatever" every time I want to address another drive. So the idea
to map cygdrive to "/" was actually very handy, thanks to this mailing list
helping to finish and polish it.
Andrey Repin (email@example.com) 23.06.2011, <20:58>
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin