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=M+ClTWwkifcsNK48 a4+uzdF6RwRLi/dr6B4MWjohyFGLKONJiJYf9c5Kq895E8M6oAfGuJocs/Uzh/Jm A+VXXgHNaXlYVYBUlnSlylw7fN7vztxWkfzK6MHkd+0grO/FHjWNoKzW/B5Dmsrl aQXRJYpbwtVP07twkzT40bmSWdc= 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=lJYbr994ZAJ9CRBD5Ra43Z sMK5k=; b=wnxzfUwr4HMbQ3ZVryXBiNG9vayNOTq24OQwD6vQ99/rJyeAiDigx4 H5esLJqbnw+keOXd6iPxDtW+SswfAV0ZpHydp9hW0+lbRmVxQHlMpY4lnQKn2jVE XBfM88xntGTomNf4+xZUX6Z2ee639uAIfuuafceZe5sKaurhx0luw= 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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1061, HContent-Transfer-Encoding:8bit X-HELO: mail-it0-f50.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=65wKTujY/IDWjF795OF7Ou31lPnCw2ks559GlIERhNg=; b=o03dQiSKcN8NAlFBHPly/uarz+nCw6q1ugMCs/zrKYJhxx6LYB8bKM9EfN6XTtWbwn Ap1Crrym+Ek7mrqB698sJzf6jLItsS+TVBdQ1TpcaddAgEUgZGWRY4Xdu7zk1bpo0PTd xXzVx1tm/SKIE5M+HiaJeNLJ3YrUxljSDy0gKAfJ0yRf7T802BBbu2vJza6jBa+Zi+99 VwV3uzsS1GsCk8BHrQwaNvJRgf/dTwVHPiVj3AOPS3C8CBnfSOeu6kF5qmmYIbJu4OM7 avvpIuKBjuZtXDnOQyikO2zzcpSlqRfWsFkmlrs35C8QwaI1BjvHLTUObJTThrmS7v41 pbww== 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> From: cyg Simple Openpgp: preference=signencrypt Message-ID: <5f5472d0-bdee-56d0-7549-41e83d48e6bc@gmail.com> Date: Fri, 31 Aug 2018 15:48:46 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180831085734.GF6350@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 8/31/2018 4:57 AM, Corinna Vinschen wrote: > On Aug 30 21:37, Steven Penny wrote: >> It is my understanding that given relative input, "cygpath" shall produce >> relative output unless given "-a" option. However I noticed a discrepancy. These >> are all correct: >> >> $ cygpath . >> . >> >> $ cygpath .. >> .. >> >> $ cygpath -w . >> . >> >> This is not: >> >> $ cygpath -w .. >> C:\cygwin64\home\ > > Long-standing behaviour. ".." in Cygwin and ".." in Windows can totally > disagree. The path is always convert to absolute at this point in favor > of correct output. There's also the additional restriction (though > not in this case) that relative Windows paths must not be longer than > MAX_PATH (260) chars. > > I'm certainly open to patches to the underlying cygwin_conv_path > function to change the Windows path to relative if possible. 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 .. -- cyg Simple -- 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