This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [1.7] bash UNC path bug?
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 28 Jul 2009 12:06:47 +0100
- Subject: Re: [1.7] bash UNC path bug?
- References: <4A6EBFE9.7080007@shaddybaddah.name>
Shaddy Baddah wrote:
> Hi,
>
> bash... maybe cygpath, seems to be doing something weird:
>
> $ cygpath -u '\\someuncpath\someshare'
> //someuncpath/someshare
> $ echo `cygpath -u '\\someuncpath\someshare'`
> /cygdrive/c/someuncpath/someshare
> $ # what's going on here
Dunno, but this sheds a little light into it:
> $ set -x
>
> $ echo `cygpath -u '\\someuncpath\someshare'`
> ++ cygpath -u '\someuncpath\someshare'
> + echo /win/f/someuncpath/someshare
> /win/f/someuncpath/someshare
>
> $ echo `echo '\\'`
> ++ echo '\'
> + echo '\'
> \
>
> $
How odd. Something stripped a level of escaping even though it's inside
single quotes. It's not cygpath, so it's probably bash. It may be by design
for all I know, something to do with being in back-ticks; I haven't RTFMd yet.
You can work around it by doubling up the backslashes:
$ echo `cygpath -u '\\\\someuncpath\\someshare'`
//someuncpath/someshare
cheers,
DaveK
--
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