delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/22/11:44:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B59D9FC.3070307@gmail.com>
Date: Fri, 22 Jan 2010 17:01:48 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Design issue with new MS-DOS style path warning?
References: <81D39E818991E549B1F66EB6A7D18422BE8626 AT AVSMOEXCL02 DOT activision DOT com> <4B57DF25 DOT 4040605 AT gmail DOT com> <7f95d3561001220517k4fd93c6btdda02fd06596e97f AT mail DOT gmail DOT com> <20100122154551 DOT GB4020 AT ednor DOT casa DOT cgf DOT cx> <7f95d3561001220823md77as48d8128d396c8370 AT mail DOT gmail DOT com>
In-Reply-To: <7f95d3561001220823md77as48d8128d396c8370@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 22/01/2010 16:23, Eric Vautier wrote:

> Let me confirm that the script has not changed at all, and used to
> work fine under the previous version. You'll agree that arriving at a
> C:/cygdrive/c/... path is a little odd, regardless of setup. 

  Nope, it's actually entirely sensible!  Because ":" is not a drive-letter
separator in Linux; it's a separator between path-list components, like ";" is
under DOS.

  So if you say "C:\foo\bar" in a path-list context, you are specifying a list
of two paths: "C" and "\foo\bar".  Cygwin (or whatever utility is doing the
work) translates each one separately and then reconcatenates them.  "C" in DOS
is a relative path to any subdirectory called "C" in the current dir; that
stays the same in unix syntax.  "\foo\bar" in DOS is an absolute path relative
to the root of the current drive, which, being your C drive, translates into
/cygdrive/c/foo/bar.  These two are then reconcatenated into a path list
separted by colons.

  The older version was buggy in this regard, it handled dos paths correctly
at the expense of making a mess of colon-separated posix-style path lists
sometimes.  That's why the behaviour has changed, because posix compatibility
wins out over windows compatibility as a design goal of cygwin, and that's why
there's now a warning, to let you know that what you are doing is not going to
work how you want it to.

    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

- Raw text -


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