delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/05/10/08:43:14

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA6C4383F87D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1589114549;
bh=+6SjYHymiCUoon4YgpkcIiIIWjmh4iakyt2cbQsc5go=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=ukolhlmKGtg+vWPiNmR2Oh6g/nKrmaJaTA8JtR/P1ow0VSHj5k/1QNaNa6fTHjqTT
YAr5kBBfGsNy6Y69hin9AhTSV0io4lGBd9AvHjpaCBpnVNNOHDzZ4mYDdiKhesmvIF
/K40g8SPke9ekL7C4CIUxvQxd3tgoeyQMWwuYTnw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 324C1385AC19
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=cKU/d7+p84Y/RytPU/SwH8Bw2boF1gTW1/KLxUOtrJg=;
b=Wv8doZK7qGy8Zjy/Rv7wAcLATCpp49yZImsxvLO6JdbFR3OWRKSf08XeGTKXFFcA/c
i0uVInLgQ2LN4vPJGLBToEU24MF2vecXKYCpInuSIBiW7qpNN2rXNruMWrXxcgDzaEC1
zZF3oZuQbAZeFs0GeIPbdOWjnwVG+JUHxyI7azYKc8Oo7igUOOGsOYDcXwGT0Wko3lBn
pxT0QhMA4ezHewdpEhwahapdJO8oQC7CPswxbvzLLBHSLliVl2FGfV31rDqq/kLoNkKY
YsO59jfB4JId6+o6OUDMSU2VCXJLRKd9PdYDpB8L7Y21trrjrpg+acBJLXEX3vPGziv/
z+Bg==
X-Gm-Message-State: AGi0PuZvBokEmMb7G6Zc1kIfApNvNJNyVntTXn80sLjbMbODvkKO6NJQ
deSWTfDks8MGnwI2DhC749WaNje+uh/4GJko7V/6LULVnMU=
X-Google-Smtp-Source: APiQypIAvgn26VlARhDQkfYWcWiZ19WYrXCoOOWaB/S73WMBzyb1OUmYoKZSe8cfLBnz1knhvs5KgoojEzK8rn9fnDQ=
X-Received: by 2002:a25:13c5:: with SMTP id 188mr18441696ybt.353.1589114546228;
Sun, 10 May 2020 05:42:26 -0700 (PDT)
MIME-Version: 1.0
Date: Sun, 10 May 2020 07:42:16 -0500
Message-ID: <CAAXzdLX9-nhXdUV8s2XoHAjOaL=KQyGV7v473uU+MudD620PtA@mail.gmail.com>
Subject: Cygwin convert environment paths
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Steven Penny via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Steven Penny <svnpenn AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

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);
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019