Cygwin convert environment paths
Steven Penny
svnpenn@gmail.com
Sun May 10 12:42:16 GMT 2020
I see here:
<https://cygwin.com/cygwin-ug-net/setup-env.html>
That Cygwin does convert some environment variables, from Windows format to
Unix format. For example HOME and TMP. But for me at least, are some important
omissions.
I use APPDATA and PROGRAMFILES a good amount, and those arent converted. To make
it worse, HOMEDRIVE and SYSTEMDRIVE arent converted either, meaning you cant
manually construct the path starting with a variable. This causes some
problems. Take this example:
<?php
$s_old = realpath('a.txt');
$s_new = getenv('HOMEDRIVE') . DIRECTORY_SEPARATOR . 'a.txt';
# PHP Warning: symlink(): No such file or directory
symlink($s_old, $s_new);
More information about the Cygwin
mailing list