delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/03/21:33:46

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AF0E7FD.3060700@tlinx.org>
Date: Tue, 03 Nov 2009 18:33:33 -0800
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Lightning/0.9 Thunderbird/2.0.0.22 ThunderBrowse/3.2.6.5 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [1.7] Undocumented change in accessing by dos drive letters?
References: <19183 DOT 9501 DOT 7117 DOT 656831 AT consult DOT pretender> <4AEF316F DOT 2070502 AT cygwin DOT com> <416096c60911021258j27d49894kda1f835b3f487a3b AT mail DOT gmail DOT com>
In-Reply-To: <416096c60911021258j27d49894kda1f835b3f487a3b@mail.gmail.com>
X-Stationery: 0.4.10
X-IsSubscribed: yes
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

Andy Koppe wrote:
> C: and C:\ aren't the same thing in DOS/cmd.exe. C: means the current
> directory of the C drive, whereas C:\ means the root directory of the
> C drive. Within each cmd.exe session, each drive has its own current
> directory.
---
	Right.  That's a cmd.exe-ism  -- As Christofpher F. says,
it's not been true in Cygwin in a long time (I don't remember it being
true, ever, but I never tried using it to see if it was supported).

	If you are in a 'bash' shell -- bash doesn't maintain
an internal, drive-specific "CWD", for each DOS drive -- it just
has 1 CWD(CurrentWorkingDir) as there is no concept of 'drivers'.  
C:\\, works due to path mangling -- likely when bash sees it, it's
already "[/YourCygPrefixHere]/c/ or root depending on your mount points.

	If "C:" worked it could be confusing, Unless, "C" was your
*only* drive -- then people might forget and think that C: meant
your CWD on your "current drive"...but really, there's no current 
drive, and I'm not sure cygwin should inherently support such a vague
syntax.  What would it mean in a POSIX context?  Would it mean
"/c/$PWD"  or "/c/", or (for /c/ == '/' i.e. c is your root partition),
would it mean '/' or $PWD?  

-l

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