delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/11/27/02:43:27

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 27 Nov 2012 08:42:57 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: "MS-DOS style path detected" triggered by escaped $ in path
Message-ID: <20121127074257.GB13311@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CE9C056E12502146A72FD81290379E9A5BA2564C AT ENFIRHMBX1 DOT datcon DOT co DOT uk>
MIME-Version: 1.0
In-Reply-To: <CE9C056E12502146A72FD81290379E9A5BA2564C@ENFIRHMBX1.datcon.co.uk>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Nov 26 10:44, Adam Dinwoodie wrote:
> 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.

This is a bash problem, apparently.  In tcsh you'll never see this.  The
above message is printed by Cygwin's path handling.  That means, bash
has given the path to some POSIX function *with* the backslash included.

Evaluating escape sequences is not the job of the system functions, but
of the caller, so I'd expect that the path gets de-escaped by bash
before calling the system function, but that's apparently not the case.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019