delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/08/21/18:00:43

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A6CD3857413
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1629583242;
bh=yH/KjN4MjOJvCqPW/Nguj8+ISmPdUCeLSEAKGuuLxTA=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=yni/H/Ix/duHyRuIVlxOTwjqnIvlOJVa+fao8E2bwdGJ97TY226JS8jhjMhmvse2c
dCqBwkfkpuU4YpqQe+5Kr0yn0KXXOLFOlUEMe08MmklHZ1jfmWz2H/1BBJttzwiG/Y
bMjYcXEVl2v7LDAAhNT3npYZ8fDEQ9MmkSL5qMaM=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CB9893858417
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=aaWnRZu5CT2buaWO9TWTjVSn54UYQJ5HNcysJFg7UHd2dwXs+uu7Y4wvu/MFi8w41s/8VuMMovco0PFhHYoA7PLB80Rbi0jr/V60cKrg8CYP92uYJOB0zBOCJD986GifUGq4kT6Tly+qvLH8PVsfbBsoRSwLDOApUunN6ooHG5fHwq+dah1j38kkiAzeigQmxd/pAEnNlev+TMaItiqrdKJ3QMUoNCZ+TcIIM/AoX7TlkmOroSnJOEojwH/tvUnjlM2KWrAItAZj7Cg6rhLPHfv/X64PwGjC/wfkZ90R0QFWHjd1SkAzMVJ1c5fLyGlobXt11JcmJOkCdQsAAeC6dA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=3/QCoWO4Qz2q9CH1IyXzJ6cL04WnvtW3Ff4CtGwT8rc=;
b=NxaZsJRu6TGasmSrtBjrL1xQXyetCUoCt/0KIZBIQkEsBO0mZHv28g0rOJwCc+RVgNmUvlzb48iC4ZnN+bUqkb/0g7SRv60Isty019vbIVsHa8G9w01wxe7jf7ed6ZUGk0MMr1VQ/ET8ii54bs+Xh69IVg8ItHrC34SLC/ZCGvuoHi8Bid2yARXpBmx6jCsChR3BHsvX6XwfuXo4vI0oGDy2KR4J+mqk3fpuHTlqo0bn+1StzAms+/iegCuL11wrWgfC7MXp2w18gpcJfUnsdSoDFmHsqPAyFhcj5loDyL2DuafTCA7Jk/8Cd5nsgttON8hpz7LI6YH1UgZYDKU71w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
dkim=pass header.d=cornell.edu; arc=none
Subject: Re: Symlink issue?
To: cygwin AT cygwin DOT com
References: <DM8PR09MB7095D974DB3B0E50CDB008FAA5C29 AT DM8PR09MB7095 DOT namprd09 DOT prod DOT outlook DOT com>
Message-ID: <4438dd5c-3575-4c4a-2ca5-869c2c6e9373@cornell.edu>
Date: Sat, 21 Aug 2021 17:59:14 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <DM8PR09MB7095D974DB3B0E50CDB008FAA5C29@DM8PR09MB7095.namprd09.prod.outlook.com>
X-ClientProxiedBy: CH0PR03CA0114.namprd03.prod.outlook.com
(2603:10b6:610:cd::29) To BN7PR04MB4388.namprd04.prod.outlook.com
(2603:10b6:406:f8::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: a3b940a9-ee98-49d8-100d-08d964eeeb10
X-MS-TrafficTypeDiagnostic: BN8PR04MB6163:
X-Microsoft-Antispam-PRVS: <BN8PR04MB61633486175CF59B0708D377D8C29 AT BN8PR04MB6163 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:8882;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: Fc2S80A00g8Fw+ci1JDa8UMpqbJET+UpISRH5lJUhPRjC5TCj5dbOiltx9zK1JWnJEWG9T6W+A5JGdY35oIXSrFh1atb7PgNvecu6V6gxEAnd3jF8Hi0AqZyOUAxwEUPqcFwFa3n3W/ZpiWrMFCkwEEID711Ba2PmsI9SI5MLy+Yc0VqMgVIIbb1kj6jOUHXcRtA/eqrL4LarJ87IpBMHUmrs7peJ7rTWxyyJBScEKwmF/GQr0P+obxtHiVTXpEH04FcMHPNODqsgkqUP/cP9n+geZCpPn7OzcQ0yDCcEYds5wiXLnyrrxXqQ8KOZM0/1uw5kZES3K2rfOiHmdLTSy4aZ+ZI4kmCwSA4fh9OWdOXbOzjvFgg8fJNKWb3TXoRr+hFTN3m3H3ha/0oPwFTFClB3AimnCSkgk3uzvIlRYDLTt0WsB4XFUhDfl+0PM3XuhTATsA3oTRfK1AMzu9A+rfXfwQ8xiD1bbgMCBmVyFyWHBHdh12QD4be/gOVj2eN5+aCyvIeUYCiwQnqedex89NJRmZ1TmFwHcdPzB3vP4VgOhzrj6n36pQMyycoQZMHV28R0rZRj0/LlmK6knMMu9KKVsILcFdiEKJQtvcK4zLGB/U7dzAfwECNtQYQ/IAAny4QoYhFP2rIk54Dm+y4sywr7FAqconUz2npjhODq0hzznavegzxMwE6o/V2YoaYQXeO9RyKr7kTzeLDJ0g4pwyVjYgF4wmtCrHNl4kIbcjULGXkjodzoSBeWUxfycT5gkUJOd2zerreQeZPEgKhvSbnLPZZNi0+WFkRQDWSRuI9QctSzS+ZZwOWhzszsSuF
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE;
SFS:(4636009)(136003)(396003)(346002)(39860400002)(376002)(366004)(186003)(316002)(66946007)(66476007)(786003)(66556008)(16576012)(31696002)(53546011)(26005)(31686004)(83380400001)(5660300002)(36756003)(6486002)(38100700002)(86362001)(478600001)(8676002)(2906002)(3480700007)(75432002)(8936002)(7116003)(956004)(2616005)(966005)(6916009)(45980500001)(43740500002);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?Windows-1252?Q?7WHb6Yt9F0+yqhv4+9F36bidop9w50yQd+OlGY9cvO8GBPDQAdusW++q?=
=?Windows-1252?Q?DbebR2nBXw0nnglhLRzW5xSoa9Q1qqe9s1gpo06JDwdh5TYh3mNNZy2h?=
=?Windows-1252?Q?oOI8DJMrcRe6cmegHFe7uo2FBnBXKuk9cZuzZZN4512GKil9oLLMr2I1?=
=?Windows-1252?Q?ZE7VD7ziS7ClolG336LHOTOXBq0Kl7agVaH+Xp/eHLdlI6soAd7edA7+?=
=?Windows-1252?Q?UNAaEZznl5aVpFpRvkxqFWRwle0Ne6wjhvoWQHdLx/QXyysN3g/wPq+t?=
=?Windows-1252?Q?0FRSr4QN/1q47R4tycHrYJNjA+ycOVm/z4KfrF7wY+DY2Y5tAruh4SsI?=
=?Windows-1252?Q?HfdOAktS4AZ8z35enJqO+/sdMHj1zi5Oa4k5GfXsr8mTIV5EpphABUmr?=
=?Windows-1252?Q?5yrtJK8Ifw3AgWxdvRTk5cS3TEULfB+tNix6nyQmGUBpSr/FOdmHh6BH?=
=?Windows-1252?Q?uMoKTK289rlygAhw3KXMyehFv3c29NHEkd9+1ElyfCxhCekXRuLxstA8?=
=?Windows-1252?Q?QTO1KEEKhP0aN35EAVaD1Xo9NOsYqA6oeEpWpEU9JjgZDPXfkvKfaL78?=
=?Windows-1252?Q?BRmdCWtA9axzyPZckyxFp1LvLuUe6Q5d7EKqIBvANztLk97LgP3jw2ii?=
=?Windows-1252?Q?9gK7eYdSNW/3x4d4u9vmtw2+G2nhkZT+Mr3CJpGG8j9XML97WBMmOczU?=
=?Windows-1252?Q?WAMSFYkUd0BW29UKklpKa1chexYzzzKBsJpkYLu5ihzbn+AlJSrtSpMA?=
=?Windows-1252?Q?aCp9uRQowoo4U1YcWIPtzzl+cXqnpV0AB7cm9JXZDUHKyO4d+FgtWaak?=
=?Windows-1252?Q?pOitCg7ppqGsePYgH6x7J+oQxOuugYXWPMgv0NTXv7kp/sqorj2iYXHv?=
=?Windows-1252?Q?SHzcR8+ruVoKEufsLn63vDiR83hPo47FTn6tK4AWzzoNxtCso/hu/GYD?=
=?Windows-1252?Q?/pdONTs6nEUXYKpUe8VGrM25EW1+2zv6aYPuFkPzsOdrGDNe2JqIfV0F?=
=?Windows-1252?Q?STRahXD9jnNSNh3oSYpq1PGJulUtRfaYAGAfmalc5s/7FpTtY94jklEj?=
=?Windows-1252?Q?nk0+4dtkJe6Y27AXNdwzpKwSCsRUpQTXOgZNqfTxJUo3FP60eccPAgnj?=
=?Windows-1252?Q?rVsJyfc+FhKxn8fhD9VTKOtr1I713kwemv0CwSu1WIBbv2F2qNaEt3Go?=
=?Windows-1252?Q?6I2ve0HIFyvD1JXkEv579c4hat2KiNiVWjgc7ZTApNG558TgsXHLCW5Y?=
=?Windows-1252?Q?fIbf/+Z859Op0K6++OQ0zfHGdikk2kyFQzZ4orm6RRKqIPoqVVX/ODhX?=
=?Windows-1252?Q?OAJFldSgSTl/AztQoCJkrXsI9cDpmcPW15se9qc3FY0LghQKWnPxmAHY?=
=?Windows-1252?Q?3MSZZ0EirZNlRIQ+SqzQS/aNUdV4MSb6HzNI7zuedr3RDOGPNFS0gm3F?=
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: a3b940a9-ee98-49d8-100d-08d964eeeb10
X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2021 21:59:16.0626 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: b1gHAkQMeZ8O6O/DQtSrSlf3ALP7FNPB3f9xyqcYVdRsg9fQRICCxtXwVqclU/b+1NsxNS9llBMhFbANb7ecHg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR04MB6163
X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MSGID_FROM_MTA_HEADER, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
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 8/21/2021 4:15 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
> Hi,
> 
> Please consider the following Cygwin session:
> 
> $ cd ~
> $ pwd
> /home/user
> $ touch file
> $ ls file
> file
> $ cygpath -w ~
> C:\cygwin64\home\user
> $ mkdir /cygdrive/g/cygwin/dir
> $ ln -s /cygdrive/g/cygwin/dir ./dir
> $ ls -l dir
> ... dir -> /cygdrive/g/cygwin/dir/
> $ cd dir
> $ pwd
> /home/user/dir
> $ cygpath -w `pwd`
> G:\cygwin\dir
> $ ls -l ../fil<TAB>  (this expands to ../file but when Enter is hit):
> ls: cannot access '../file': No such file or directory
> 
> so basically "file" is not accessible with the relative dot-dot link,
> even though somehow readline (bash completion) can figure it out and suggest
> the correct completion.
> 
> Is this a Cygwin bug?

I don't think so.  I see identical behavior on Linux (using /tmp/dir instead of 
/cygdrive/g/cygwin/dir).

Pathname resolution proceeds from left to right, with symlinks expanded as they 
are encountered.  See "Pathname resolution" in

   https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html

When the CWD is /home/user/dir, the resolution of ../file goes like this:

../file = /home/user/dir/../file
         = /cygdrive/g/cygwin/dir/../file
         = /cygdrive/g/cygwin/file,

which doesn't exist.

I don't know why bash completion suggests something different.  My guess (and 
it's only a guess) is that bash completion takes a shortcut for performance reasons.

Ken

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