From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17830 invoked by alias); 31 Aug 2018 19:48:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17810 invoked by uid 89); 31 Aug 2018 19:48:54 -0000 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 Received: from mail-it0-f50.google.com (HELO mail-it0-f50.google.com) (209.85.214.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Aug 2018 19:48:53 +0000 Received: by mail-it0-f50.google.com with SMTP id j81-v6so8615991ite.0 for ; Fri, 31 Aug 2018 12:48:52 -0700 (PDT) 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== Return-Path: Received: from [192.168.0.3] ([69.47.131.109]) by smtp.gmail.com with ESMTPSA id x14-v6sm2861221ita.18.2018.08.31.12.48.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 12:48:50 -0700 (PDT) Subject: Re: error in "cygpath" behavior To: cygwin@cygwin.com References: <5b88c605.1c69fb81.f383.a0b6@mx.google.com> <20180831085734.GF6350@calimero.vinschen.de> From: cyg Simple Openpgp: preference=signencrypt Message-ID: <5f5472d0-bdee-56d0-7549-41e83d48e6bc@gmail.com> Date: Fri, 31 Aug 2018 22:34:00 -0000 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 X-SW-Source: 2018-08/txt/msg00398.txt.bz2 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