This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Strange cygpath behavior.
- From: Andrey Repin <anrdaemon at freemail dot ru>
- To: Peter Rosin <peda at lysator dot liu dot se>, cygwin at cygwin dot com
- Date: Thu, 23 Jun 2011 16:52:30 +0400
- Subject: Re: Strange cygpath behavior.
- References: <73619422.20110621092310@mtu-net.ru> <4E00321A.30105@lysator.liu.se>
- Reply-to: Andrey Repin <cygwin at cygwin dot com>
Greetings, Peter Rosin!
>> I'm facing an unacceptable cygpath behavior related to the network shares.
> Unacceptable?
Exactly.
> 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.
>> [\\DAEMON1\anrdaemon]$cygpath -m \\DAEMON1\anrdaemon\.profile
>> //DAEMON1/anrdaemon/.profile
> I think you mean cygpath -m //DAEMON1/anrdaemon/.profile
No.
> (-m expects posix path arguments)
How come? Switch only defining the result, not the source data.
>> [\\DAEMON1\anrdaemon]$cygpath -lm \\DAEMON1\anrdaemon\.profile
>> //DAEMON1/anrdaemon/.profile
> I think you mean cygpath -lm //DAEMON1/anrdaemon/.profile
You think wrong.
>> [\\DAEMON1\anrdaemon]$cygpath -u "\\DAEMON1\anrdaemon\.profile"
>> /DAEMON1/anrdaemon/.profile
> I think you mean cygpath -u "\\\\DAEMON1\\anrdaemon\\.profile"
Again, no.
>> [\\DAEMON1\anrdaemon]$cygpath -m "\\DAEMON1\anrdaemon\.profile"
>> ///DAEMON1/anrdaemon/.profile
> I think you mean cygpath -m "//DAEMON1/anrdaemon/.profile"
No, yet again.
>> [\\DAEMON1\anrdaemon]$cygpath -lm "\\DAEMON1\anrdaemon\.profile"
>> ///DAEMON1/anrdaemon/.profile
> I think you mean cygpath -lm "//DAEMON1/anrdaemon/.profile"
No, for the last time.
>> Only unquoted path producing usable results, but it's not realistically
>> imaginable I would let it run this way.
>> One day I will sure meet a file with "]" in it's name, and the surrounding
>> environment will break. Or, even simpler, I'll hit a filename with spaces...
>>
>> This issue arising in different places of cygwin (originally I got nailed by
>> it when trying to run diff across my now-network profile folder). cygpath is
>> just a closest example I could reach for this message.
Glad you quoted it, strange that you didn't read it.
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 23.06.2011, <16:49>
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