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

