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: Symlink to drive and space in directory name leads to DOS warning


Eric Blake wrote on 2011-05-02: 
> On 05/02/2011 09:30 AM, Thrall, Bryan wrote:
>> When I try to do a tab-completion on a directory with a space in it
> for the first time after starting Cygwin, I get a DOS warning even
> though I'm not using a DOS path. This only seems to happen when I
> access the directory through a symlink I have to my E: drive, like so:
>> 
>> thrall@pc1163-8413-xp ~
>> $ pushd ~/myuserdrv/My\ Downcygwin warning:
>>   MS-DOS style path detected: ~/myuserdrv/My\ Downloads Preferred POSIX
>>   equivalent is: ~/myuserdrv/My/ Downloads 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
> 
> Are you using bash-completion?  If so, it's likely a bug in
> bash-completion for passing an underquoted file name through the shell
> such that it results in a failed globbing attempt on a literal \.

AFAIK, I am not using bash-completion; the package is installed, but I don't source /etc/bash_completion in my ~/.bashrc.

> I haven't yet managed to reproduce this in my setup (perhaps I need to
> double-check that my $CYGWIN hasn't already suppressed the warning?).
> Maybe showing:
> 
> $ set -vx
> $ pushd ~/myuserdrv/My\ Down[TAB]
> 
> might give me some insight where to look at plugging the leak?

I don't think there's much help there, unfortunately:

thrall@pc1163-8413-xp ~
$ set -vx
settitle
++ settitle
++ echo -ne '\033]0;bash\007'
thrall@pc1163-8413-xp ~
$ pushd ~/myuserdrv/My\ Downcygwin warning:
  MS-DOS style path detected: ~/myuserdrv/My\ Downloads
  Preferred POSIX equivalent is: ~/myuserdrv/My/ Downloads
  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
loads/
pushd ~/myuserdrv/My\ Downloads/
+ pushd '/home/thrall/myuserdrv/My Downloads/'
~/myuserdrv/My Downloads ~
settitle
++ settitle
++ echo -ne '\033]0;bash\007'

(settitle is my function to set the window title; PROMPT_COMMAND is set to it)

It does seem to be limited to tab-completion, though; if I type in the full directory name (~/myuserdrv/My\ Downloads) and hit enter, I don't get the warning.

E: is a partition of my local drive, in case it matters.
--
Bryan Thrall
FlightSafety International
bryan.thrall@flightsafety.com
? 



--
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]