X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4AF4A495.3060108@bopp.net>
Date: Fri, 06 Nov 2009 16:35:01 -0600
From: Jeremy Bopp <jeremy@bopp.net>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: 1.7] Can you have multipe cygdrive path prefixes active at once
References: <26227605.post@talk.nabble.com> <26227607.post@talk.nabble.com> <4AF3C9FE.806@bopp.net> <26230853.post@talk.nabble.com> <4AF495B0.7090607@bopp.net> <786EBDA1AC46254B813E200779E7AD36617A63@srv1163ex1.flightsafety.com>
In-Reply-To: <786EBDA1AC46254B813E200779E7AD36617A63@srv1163ex1.flightsafety.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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

Thrall, Bryan wrote:
> 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:
>> $ dirname $(cygpath -u C:/)
>>
>> 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 :)

That's pretty sweet, but that feature seems to be fairly fortuitous
rather than by design.  Maybe someone could speak on this point with
more authority.

-Jeremy

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

