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: [1.7] bash UNC path bug?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]