delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/06/28/05:25:35

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1BEE3857B8D
Authentication-Results: sourceware.org;
dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 25S9OgD9010299
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
s=dec2015msa; t=1656408283;
bh=JZ0y3rxr56pOCPSnS4N7RsKeqIkeJj2n/S8f/9v5q0k=;
h=Date:From:To:Subject:In-Reply-To:References:From;
b=R+wY3LsN7Pul62r1ruyh6VLGwehic74edwd9yJnwpOr4tzkunQaiOLUt+hWLP8lFS
Ju5eXZjBzrTg8L00T/22o7vqOnUqte3E7Tp6DYEP+T8IatNIOznNfil7+vdJAftaVX
gtFMQzJdhj8VHxTwy4yMjc8BQxaAdW/dntcoTY5XyS0n90KLYPToEzZhrWYBFxsyn7
ymg7lCL1XYkzCTndzw9RHlf2jYU96bTAY37z9LUKG4yw21m+e6JPCw4rzo+8T/OeMx
Wnb/pEqgEbYP76xKJfDHVkrcJIh9NHKtrH/PHaTZWpZqTNJzNCcf9Hj8/rVUh1aCtk
FH8tFGsPaRkjw==
X-Nifty-SrcIP: [119.150.44.95]
Date: Tue, 28 Jun 2022 18:24:42 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: cygpath 3.3.4 : incorrect windows to unix path conversions
Message-Id: <20220628182442.a58b052e13de7487f65f69c0@nifty.ne.jp>
In-Reply-To: <CACNhcBEFQnPdHLFpMp9ktVV1cKvT6rOFv9LH4iRxz+V4SSzZ4Q@mail.gmail.com>
References: <CACNhcBEFQnPdHLFpMp9ktVV1cKvT6rOFv9LH4iRxz+V4SSzZ4Q AT mail DOT gmail DOT com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Tue, 28 Jun 2022 09:44:56 +0200
Timothee Besset wrote:
> We are seeing some odd behavior from cygpath.exe when it is copied and used
> outside the normal cygwin installation directory:
> 
> PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
> /cygdrive/c
> 
> After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:
> 
> PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
> /
> 
> (should be /cygdrive/c!)

Both / and /cygdrive/c are correct in this case.
The root directory for cygwin is the parent directory of the
directory where cygwin1.dll is located.

If cygwin1.dll is located in c:\tmp, the root directory for
cygwin is c:\. Therefore, / is correct answer for cygpath -u 'c:\'.

This is the same with the fact that
c:\cygwin64\bin\cygpath.exe -u "c:\cygwin64"
returns / rather than /cygdrive/c/cygwin64.

> After copying those same files to C:\tmp\tmp:
> 
> PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
> /cygdrive/c

In this case, the root directory for cygwin is c:\tmp.
Therefore, c:\ is outside of the cygwin directories.
So, cygpath -u 'c:\' returns /cygdrive/c.


-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

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