X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=JtxShSt4BEzG34TO MfGxnmJe9YwR+9dkVP/ezHBAuVU6nLcXjaPo/ygrwUCutAwvdF2TsAvxha3MyiDB A+MwZdkO65vHoo7I8iw+JOYOMg+bil2EWqwiZSA6XqV12WwAN93n5nCASuPFs+IF g26jrhOzCSnjwt+lhpxWN+u06PE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=aiaG5z5gg3UGZGQ8qxO509 gGH7U=; b=P6KwYlp8gYcxMFyO+KHmRmULegpVLp7AqgSc42/CtkBEiQVPhGrmCd EIq3fuBhbDUfJJ8AYCh5ojnaTXY4RXWR8i1xQyROQjvr6H3DuG6ugNY1OQyIo2r8 2Bi6eNAwbql0KG+6ZUEHZuyWLKVFiF8pIPEyrAZ6riUGNNyQk5nJo= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=acting, knowing X-HELO: mx1.redhat.com Subject: Re: error in "cygpath" behavior To: cygwin AT cygwin DOT com References: <5b88c605 DOT 1c69fb81 DOT f383 DOT a0b6 AT mx DOT google DOT com> <20180831085734 DOT GF6350 AT calimero DOT vinschen DOT de> <5f5472d0-bdee-56d0-7549-41e83d48e6bc AT gmail DOT com> From: Eric Blake Message-ID: Date: Fri, 31 Aug 2018 15:05:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5f5472d0-bdee-56d0-7549-41e83d48e6bc@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 08/31/2018 02:48 PM, cyg Simple wrote: > > Don't forget the possibility that '..' points to a symlink which Windows > will not understand. > > $ mkdir -p /foo/baz > $ ln -s /foo /bar > $ cd /bar/baz > $ cygpath -w .. Except .. never points to a symlink. It always points to the physical directory that contains the current directory (that is, /foo, not /bar). The shell can maintain a notion of a logical current directory (based on whether you use 'set -P' for physical or 'set +P' for logical; where bash defaults to +P), and in that mode, 'cd ..' behaves logically (acting as though you are now in /bar, rather than actually changing you to /foo). But that still doesn't change the fact that '..' in file name resolution never resolves to a symlink, because the shell is merely rewriting your ".." to avoid passing it on to the syscalls, rather than the syscalls actually knowing about logical mode. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple