[1.7] bash UNC path bug?

Dave Korn dave.korn.cygwin@googlemail.com
Tue Jul 28 11:57:00 GMT 2009


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



More information about the Cygwin mailing list