"MS-DOS style path detected" triggered by escaped $ in path

Adam Dinwoodie Adam.Dinwoodie@metaswitch.com
Mon Nov 26 10:44:00 GMT 2012


Hi,

If I use paths that contain $ symbols, and backslash-escape them, I start
seeing warnings about MS-DOS style paths in Cygwin bash.  For example, where I
hit <tab> after the .ssh/:

    $ cp //pcname/C\$/cygwin/home/add/.ssh/cygwin warning:
      MS-DOS style path detected: //pcname/C\$/cygwin/home/add/.ssh/
      Preferred POSIX equivalent is: //pcname/C/$/cygwin/home/add/.ssh/
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

I believe the path I entered, //pcname/C\$/cygwin/home/add/.ssh/, is valid.
The equivalent MS-DOS style path would be \\pcname\C$\cygwin\home\add\.ssh\.

This appears to simply be an erroneous warning; everything else I tried works,
including tab-completion, calls to cp or ls or similar.  Leaving out the
backslash-escape works, but only thanks to the particulars of bash's handling
of $ and the next character being /.  Single-quoting the path also avoids the
warning, but prevents tab-completion.  Partial quoting (ie //pcname/C'$'/cygwin/)
has the '$' replaced by (the apparently erroneous) \$ when I attempt to use
tab-completion!

The only impact I can see is the "MS-DOS style path" warning, and I'm aware
this is an edge case, so I'm not going to get excited about getting this fixed.
I just figured I'd report a bug when I spotted one.

(Thinking about it, I'm not sure it even is a bug; I could have been intending
to talk about \\pcname\C\$ rather than \\pcname\C$.  I suspect this may be
another case where there's no ideal solution.)

Output from cygcheck -s -v -r attached.  I redirected stderr into that file,
too, since I saw some errors about "OpenService failed ... Access is denied",
and figured they'd be more useful interlaced with the regular output.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 32161 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20121126/63dd81c7/attachment.obj>
-------------- next part --------------
--
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