public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin convert environment paths
@ 2020-05-10 12:42 Steven Penny
  2020-05-10 15:06 ` Achim Gratz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Steven Penny @ 2020-05-10 12:42 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Cygwin convert environment paths
@ 2020-05-10 15:48 Steven Penny
  2020-05-10 16:41 ` Marco Atzeri
  2020-05-10 19:05 ` Achim Gratz
  0 siblings, 2 replies; 7+ messages in thread
From: Steven Penny @ 2020-05-10 15:48 UTC (permalink / raw)
  To: Stromeko; +Cc: cygwin

> That's what cygpath is there for, among other things.

You expect people to use cygpath... from within PHP?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-12 19:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 12:42 Cygwin convert environment paths Steven Penny
2020-05-10 15:06 ` Achim Gratz
2020-05-10 17:52 ` Doug Henderson
2020-05-12 19:18 ` Andrey Repin
2020-05-10 15:48 Steven Penny
2020-05-10 16:41 ` Marco Atzeri
2020-05-10 19:05 ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).