Achim Gratz writes: > I need cygpath to get the system directory (hint: it need not be in > C:\Windows\System32) and cygpath delivers that directory with the > cygdrive prefix and not /proc/cygpath prepended. I wouldn't mind if all > those special directories would also be available via /proc/<whatever>, > which means I wouldn't even need to fork cygpath for getting there.
This will get me the correct path to link to, but I still think it's unnecessarily ugly (and took a while to cover all the possibilities of not-so-well-formed cygdrive prefixes): --8<---------------cut here---------------start------------->8--- CYGDRIVE="$(/usr/bin/cygpath -u C:)" WINETC="$(/usr/bin/cygpath -S -u)/drivers/etc" WINETC="/proc/cygdrive/${WINETC#${CYGDRIVE%c}}" --8<---------------cut here---------------end--------------->8--- versus the hypothetical --8<---------------cut here---------------start------------->8--- WINETC="$(/usr/bin/cygpath -S -U)/drivers/etc" --8<---------------cut here---------------end--------------->8--- BTW, the path comprising the cygdrive prefix probably needs to be sanitized to avoid things like --8<---------------cut here---------------start------------->8--- $ mount -c /bla//fasel////blum////// --8<---------------cut here---------------end--------------->8--- leaking into the wild. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds -- 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