From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106741 invoked by alias); 7 Feb 2017 23:13: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 106663 invoked by uid 89); 7 Feb 2017 23:13:55 -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=hurts, caution, Hx-languages-length:1415 X-HELO: mail-io0-f181.google.com Received: from mail-io0-f181.google.com (HELO mail-io0-f181.google.com) (209.85.223.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 23:13:53 +0000 Received: by mail-io0-f181.google.com with SMTP id v96so103018236ioi.0 for ; Tue, 07 Feb 2017 15:13:53 -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=pcRePd1sEcd0nCaV+ugr+je0IeZPkZeAW8ywP1nmzL0=; b=KHyhlOFZkbRVJ7YJW3mIBSZTQ1wZQd+wopqo69kDrw7HMpRbqiWbTvDClV29aR4Ndd ZjdHp3veikUlLSzZT3a7Q0fj6qPnm44k3VkayZ+8L44SHEpDjkEipJzBUStkzwBmGGfT LnF4J9njLbPMzxggkAbANUX05YapoRAKKuN+Sr5o17JtBlCA8xWJHUaoMyJ40oINbwhd Mtr+EYHjURJBbqoKzcgnC+5Ks5y3kqYFGrKNzQe9vZvhX0NbaWJ4yV8aja8Riu5TfXOE GuIsJktjTh/DLVOrxxAArp/ohqIJ7m85Kcz2ZUekg1ExdAE47lyFS7b0IGa+w92Z0e8Y kRew== X-Gm-Message-State: AMke39mgNbe6C9ZdI4GN3t3JaoNZmueZwarXG5UtF1qrvpNacy+6H4fTN0oSQxS6VRvS0Q== X-Received: by 10.107.6.215 with SMTP id f84mr6585406ioi.210.1486509231755; Tue, 07 Feb 2017 15:13: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 202sm51989ity.8.2017.02.07.15.13.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 15:13:51 -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> From: cyg Simple Message-ID: <77e64e0a-0280-46d7-32d1-9b0b3a301135@gmail.com> Date: Tue, 07 Feb 2017 23:13: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: <357614277.20170207183005@yandex.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00100.txt.bz2 On 2/7/2017 10:30 AM, Andrey Repin wrote: > Greetings, Roger Qiu! > >> Hi, > >> I've found that `cygpath --windows '../` will give back an absolute >> windows path. > >> I thought this would only happen if you provide the `--absolute` flag, >> or when the path is a special cygwin path. > > ".." is a special path, that can't be safely converted. > In all cases, using absolute path is preferred for many reasons. > May be preferred but the -a --absolute flags tell me that it should be a user choice and not forced on the user. >> But this occurs just for normal directories. > >> I have come across a situation where I need to convert ntfs symlinks to >> unix symlinks and back. Sometimes these symlinks have relative paths >> them. Now by using cygpath --windows, I get back absolute paths, which >> means the integrity of the symlink isn't preserved. > >> Can `cygpath --windows '../directory'` give back `..\directory` for >> paths aren't special cygwin paths? These relative backslashes are >> supported in Windows right now. > > AFAIK, Windows do not support relative junction points. > > But it should be left to the user of the tools to use them with their environment as needed. Getting too cautious to "help" the user with their own environment isn't ideal because there is always someone else that the caution hurts. -- 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