FAQ
`cygpath C:\' isn't completely fool-proof as C:\ might be mounted independently.
(you decide if it's fool-proof enough for the case at hand)

`readlink /proc/cygdrive' does look like the best solution.

So, the best way I see is to use it and fall back to the heuristics if it's
missing.

"Shelling out" can't be avoided unless you wish to check the registry by hand:
initially (in 2000), there was no dedicated utility to read the prefix at all,
the docs pointed directly to the registry
(http://web.archive.org/web/20001213205800/http://www.cygwin.com/cygwin-ug-net/using.html;
http://web.archive.org/web/20001213195700/http://www.cygwin.com/cygwin-ug-net/using-utils.html#MOUNT).

I'll now check the Cygwin repo for /proc/cygdrive addition time vs. registry
setting elimination time to see if one can avoid the heuristics entirely and
skip from the former directly to the latter.

--
Best regards,
  Ivan mailto:vano@mail.mipt.ru

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 8 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedDec 6, '15 at 5:58p
activeDec 9, '15 at 4:29a
posts8
users3
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase