Strange cygpath behavior.
Andrey Repin
anrdaemon@freemail.ru
Thu Jun 23 15:20:00 GMT 2011
Greetings, Marco atzeri!
>>>> I'm facing an unacceptable cygpath behavior related to the network shares.
>>
>>> Unacceptable?
>>
>> Exactly.
> Unacceptable seems a moral judgement, for this reason
> I guess Peter is perplexed.
>>
>>> Perhaps your quoting skills and expectations fall
>>> into that category...
>>
>>>> The testcase is:
>>>>
>>>> [\\DAEMON1\anrdaemon]$cygpath -u \\DAEMON1\anrdaemon\.profile
>>>> //DAEMON1/anrdaemon/.profile
>>
>>> I think you mean cygpath -u \\\\DAEMON1\\anrdaemon\\.profile
>>
>> No, I did mean what I wrote.
> What about a more clear explanation of what do you expect
> to obtain ?
Me? I expect to be able to use Cygwin utilities in Windows environment.
As supposed to... to my best knowledge.
> I have problem to understand your problem,
> while Peter answer seems more obvious (to me).
Problem is that path detection/conversion does not work for network paths.
> Problem reports: http://cygwin.com/problems.html
> In general the "\" is used as escape character so unquoted
> it just preserves the next character
> \\DAEMON1\anrdaemon\.profile
> is equivalent to
> "\DAEMON1anrdaemon.profile"
Try it yourself, as well as what Peter tried to suggest (or "correct" me).
Neither is working straight.
Just for example:
$ cygpath -u \\\\DAEMON1\\anrdaemon\\.profile
/c/DAEMON1/anrdaemon/.profile
Or, before we get lost, try to make this simple and widely used construction
work straight:
#! /bin/sh
XXX=${XXX:=$(readlink -fn "$0")}
XXX=$(dirname "$XXX")
ls -l "$XXX"
Cygwin, to my best understanding, is supposed to transparently accept native
Windows paths.
And, say,
diff "%USERPROFILE%\.profile" "someotherprofile\.profile"
works... as long as it's a local path (including mapped drives).
Network paths break instantly.
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 23.06.2011, <18:47>
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
More information about the Cygwin
mailing list