delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/04/18/03:59:55

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8108B393C037
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1618732791;
bh=CMff/yg/CVgE8opPraFq8hXbQTD1NcKO8OdGWPj1eRU=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=qeUaelbTZTBT/JfQBUVnQp/BFlJsRwLlB1xyV9I+HQykceVAhcWAGw98tPvZavZKI
lMNYasfmHS4DJ7LA7i5FovjbLPzWEmfUpzB07I6qnbITkn9QCWSfLE4HPZO7p3zDiM
s+C8tRF82i1/jliJiFVJ78219B+BePv/HdD9oP8Y=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 75CD6393BC24
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=/lm5OW38E3zWKzE6HJI202by7CWImLbzyyaYzsyurBM=;
b=QE2NZm+u+VPo0NuQWeTapySPt8Py55BDc6NyJD4ZP/I4bnutP2kcPux7xgqZvemZtE
BCachf20SAtnZKo7QSBsMyBR1Z4sOPJuFDrTLzDZEyLx4luwFUCFTNjjCZEgVFzRy0vW
ukglLY2/znPmdGAuvOQHAfrh1z7pE1DDfWX9bfZ+Df7pXoPI87b8cpuA8fuZtfvukMU7
VFQzy60B7fxESapP2CNQfBh53ORliARxakbtqXId6ssRx95rThJGjSSQ2U9BhcdbmFN0
QE1jLxa0LwTqf+E9k2MxB2OyhRdYUp8jRQIZNkJikeRDLeVpHTv09pw/4MyNaoIU5yhD
8iYQ==
X-Gm-Message-State: AOAM532oC4wbnRnMCdi+wmpJ86BlsbXG4Vuw/2YYdlDsccnAxlIDXigY
DYlPth3/chnARtgHXgIUMMev6YMv4SRY4F2HByTknj1n9LjsfA==
X-Google-Smtp-Source: ABdhPJwEP+mA5qQBkbAhdxozXWzix1Gh+AtlmY/tbwcFss4X1QUoF5FPgwkcJXhRZwYHr2/EIyLjGjNB4QGPowS80mU=
X-Received: by 2002:a63:570b:: with SMTP id l11mr6499496pgb.193.1618732778141;
Sun, 18 Apr 2021 00:59:38 -0700 (PDT)
MIME-Version: 1.0
Date: Sun, 18 Apr 2021 10:59:26 +0300
Message-ID: <CAGHpTBK781REMJ3n276sy25JniKtzXKJan7xYyMh3jh=rgXdgg@mail.gmail.com>
Subject: realpath issue with native[strict] symlinks
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-0.3 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: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Orgad Shaneh via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Orgad Shaneh <orgads AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Hi,

When winsymlinks:native/nativestrict is used, realpath doesn't resolve
the full path correctly, when a symlink to the same directory is used.

Example follows. The output is:
/home/user/recurse/test/d1
/home/user/recurse/test2/d1

While it should be /home/user/recurse/d1 for both.

A few observations:
1. When CYGWIN is not set at all, the link is created as a junction.
It works ok in cygwin, but cannot be accessed from cmd (probably
because it is a file junction, and not a directory one). On this case,
realpath works as expected.
2. If I create a junction using mklink /j test3 ., the issue reproduces,
regardless of winsymlinks configuration.

#!/bin/sh

export CYGWIN=winsymlinks:nativestrict
rm -rf recurse
mkdir recurse
cd recurse
mkdir d1
ln -s . test
ln -s $PWD test2
cmd ///c 'mklink /j test3 .'
(cd test/d1 && realpath .)
(cd test2/d1 && realpath .)
(cd test3/d1 && realpath .)

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