From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43435 invoked by alias); 11 Feb 2017 21:27:55 -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 43426 invoked by uid 89); 11 Feb 2017 21:27:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=cyg, relative, Qiu, predictable X-HELO: mail-it0-f41.google.com Received: from mail-it0-f41.google.com (HELO mail-it0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 Feb 2017 21:27:53 +0000 Received: by mail-it0-f41.google.com with SMTP id k200so50368603itb.1 for ; Sat, 11 Feb 2017 13:27:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=deAEVy6WVMAe4S+OsAFTiZsPZvzQKx1HXKvszYFJrZ0=; b=gMP4meaTBhfwwF3cQEKU+JBvIC7/8BUP7FaE+vd0xXttb5r2gnWzWPVHoiB6ykujUs N69CO0r71m58iFocOpq1Wjk9iv0EkzaIN0OyB4UGT91csOz+ZbR7sXpOZkL1pKHwxDft 9cmQVo1HVRPP2jaz75wt0uSqi+uDGKbvT3zPcCKcqmzralb6jo0RuTlW95Pcrv9kivDR yPxS4khz+/jQCXN6ghAfsA0SaaV9GLFIesHdy559cQWgwKERO4gFnCywfPgxalclU3iN ghjQa2EKtPKVGRVhSK5aaLLkkruUdu8cp+my53fsEocm4qDVi3uTXnlbB3DYqdF7PwqE neMQ== X-Gm-Message-State: AIkVDXI9POR8eM+FGv7sEPLgaLrKdILI8NJjN2YLptCBJs7xBQwL2shciRCzE6FVTf8GRQ== X-Received: by 10.36.116.7 with SMTP id o7mr35024237itc.31.1486848471441; Sat, 11 Feb 2017 13:27:51 -0800 (PST) Received: from [192.168.0.6] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id j4sm1784772ita.29.2017.02.11.13.27.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 13:27:50 -0800 (PST) Subject: Re: cygpath -w converts relative paths to absolute windows paths To: cygwin@cygwin.com References: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io> <357614277.20170207183005@yandex.ru> <1995347138.20170208135417@yandex.ru> From: cyg Simple Message-ID: <14c8207e-0edd-a04a-6aeb-bd7f33d74a7f@gmail.com> Date: Sat, 11 Feb 2017 21:27:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00154.txt.bz2 On 2/8/2017 5:42 PM, Thomas Wolff wrote: > Hi Andrey, > > Am 08.02.2017 um 11:54 schrieb Andrey Repin: >> Greetings, Thomas Wolff! >> >>> Am 07.02.2017 um 16:30 schrieb Andrey Repin: >>>> Greetings, Roger Qiu! >>>> >>>>> I've found that `cygpath --windows '../` will give back an absolute >>>>> windows path. >>>>> ... >>>> ".." is a special path, that can't be safely converted. >>> How is the special meaning of ".." so much different in Windows than in >>> Cygwin/Linux/POSIX that it could not be mapped? >>> Things like dir .., cd .., type ..\sub\file all work comparably. >> Comparable? May be. Predictable? >> https://bugs.php.net/bug.php?id=73797 > I don't know what __DIR__ is supposed to mean in PHP. Anyway, handling It's simply a constant of the directory for the file in which __DIR__ appears. The constant has a namespace relative to the file. > ".." is not predictable even within Linux/Cygwin, you could see > something like: >> ls dir1/file > dir1/file >> cd dir2 >> ls ../dir1/file > No such file or directory > > (if dir2 is a link), or can have surprising effects of cd vs. cd -P. > I don't see how that should exclude ".." from being transformed to ".." > by cygpath -w, even if the result may be somewhat unexpected in some > border cases (which I haven't seen yet). I agree. -- 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