This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7] Can you have multipe cygdrive path prefixes active at once


Jeremy Bopp writes:
> 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.

This doesn't seem to work in the case where you have mounted the C: drive.
For example I mount C: on /c

And the above returns:
$ dirname $(cygpath -u c:/)
/
which doesn't tell me what the cygdrive prefix is -- only where 'c' is
mounted.

Of course, as pointed out in a later reply, one can use an unused disk drive
letter like 'x' but that is hardly robust since who knows what drive letters
will be unused and/or unmounted.

-- 
View this message in context: http://old.nabble.com/1.7--Can-you-have-multipe-cygdrive-path-prefixes-active-at-once-tp26227605p26249511.html
Sent from the Cygwin list mailing list archive at Nabble.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]