delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/06/28/04:20:24

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 20AAF3858418
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=yandex.ru
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru
X-Yandex-Fwd: 2
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
t=1656404401; bh=vMHIUHb9fJrJEaoAWa/SForBD7CghkpicaJ6RhOQxxM=;
h=In-Reply-To:Subject:To:From:Message-ID:References:Date:Reply-To;
b=Iorii5nX6j36dqCJvilBYEwqxPqUp64rkDxe5DF8jUMH4Gi0rtaPpPImuOeTaeAa0
pntDgqncMPo3pBwK8rcltrcE7BG2XSzgh5lsPdCyjHNUQRiVDckEhYPjtewousacYH
FYdbWE2XArAqHYliTmMjfjKdniopyAWzZBinsIwM=
Authentication-Results: vla1-765d064640cd.qloud-c.yandex.net;
dkim=pass header.i=@yandex.ru
Date: Tue, 28 Jun 2022 11:19:56 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <995714381.20220628111956@yandex.ru>
To: Timothee Besset <ttimo AT ttimo DOT net>, cygwin AT cygwin DOT com
Subject: Re: cygpath 3.3.4 : incorrect windows to unix path conversions
In-Reply-To: <CACNhcBEFQnPdHLFpMp9ktVV1cKvT6rOFv9LH4iRxz+V4SSzZ4Q@mail.gmail.com>
References: <CACNhcBEFQnPdHLFpMp9ktVV1cKvT6rOFv9LH4iRxz+V4SSzZ4Q AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no 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>
Reply-To: cygwin AT cygwin DOT com
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>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 25S8KNdt012607

Greetings, Timothee Besset!

> Hello,

> 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

To begin with, "C:" means "current working directory on drive 'C:'". Not "root
directory of 'C:'".
The behavior of cygpath is incorrect in this case.

> After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:

Both must be in '…/bin' directory, this is user error.

> PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
> /

> (should be /cygdrive/c!)

No? See above.

> After copying those same files to C:\tmp\tmp:

> PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
> /cygdrive/c

> It works again!

By coincidence. (And no.)

> We bundle a few cygwin pieces (ssh, rsync) in our application and run them
> on machines that may not have cygwin installed, this is why we are trying
> to use cygpath outside a normal installation directory - see
> https://gitlab.steamos.cloud/devkit/steamos-devkit for details.

See above, cygwin tools' layout must follow FHS, or you will see all sorts of
issues.
That aside, you could always use /proc/cygdrive/ root for manual path conversion.

> We've been using this setup for more than a year and only noticing this
> now; I suspect this used to work fine but I couldn't tell you of an older
> version that worked for sure.

Um, no.


-- 
With best regards,
Andrey Repin
Tuesday, June 28, 2022 11:14:52

Sorry for my terrible english...

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