delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/06/17:21:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: 1.7] Can you have multipe cygdrive path prefixes active at once
Date: Fri, 6 Nov 2009 16:21:35 -0600
Message-ID: <786EBDA1AC46254B813E200779E7AD36617A63@srv1163ex1.flightsafety.com>
In-Reply-To: <4AF495B0.7090607@bopp.net>
References: <26227605 DOT post AT talk DOT nabble DOT com> <26227607 DOT post AT talk DOT nabble DOT com> <4AF3C9FE DOT 806 AT bopp DOT net> <26230853 DOT post AT talk DOT nabble DOT com> <4AF495B0 DOT 7090607 AT bopp DOT net>
From: "Thrall, Bryan" <bryan DOT thrall AT flightsafety DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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

Jeremy Bopp wrote on Friday, November 06, 2009 3:31 PM:
> Well, it's a bit of a hack, but you could try something like the
following:
>=20
> $ dirname $(cygpath -u C:/)
>=20
> This assumes that there is always a C: drive and converts the path to
> the root of that drive into a POSIX path which will include the
cygdrive
> prefix.  Then dirname is used to effectively chop off the drive letter
> leaving you with the cygdrive prefix.

Actually:

$ ls /cygdrive
c  e  f  h  j  p  t  z
$ cygpath -u x:/
/cygdrive/x

Seems like you aren't assuming the drive exists :)
--=20
Bryan Thrall
FlightSafety International
bryan DOT thrall AT flightsafety DOT 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

- Raw text -


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