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, 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:

> 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

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.

 Andrey Repin ( 23.06.2011, <18:47>

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]