Cygwin convert environment paths

Andrey Repin
Tue May 12 19:18:12 GMT 2020

Greetings, Steven Penny!

> I see here:

> <>

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

These are not making any sense for Cygwin itself, so they are left alone.

>     <?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);

Use native php ?…

With best regards,
Andrey Repin
Tuesday, May 12, 2020 22:17:30

Sorry for my terrible english...

More information about the Cygwin mailing list