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=dcg+VeaaMwSvK82G jpPGjNAaci9N834PoyBlkZCay68ArznDCCLT9H2HLSfhONA7bUUhn1F+aBDWkshI MZ1E1R6DJXh7YZq4U3Nzzz2OH97zGrlyoJYjye/jvA19j1pZLKfLfwxNOC35546w mch/ohZJFno8C85p2lnFZ8m0Sy4= 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=f4qSi6BjduiMbMn/I41s94 017+w=; b=SHwb8VUfJNBY2UBKO83oCgFk2ui5Q+e9MFx6t7IrNgBfR21fLU1aCP 6FS2WWaCfe4DOOVX7/bVCE137kBwrO+hla3M9lq9plYAAJ60OogLG+FHR1VKpFAi 9ExWfz3x3VRvRrD/XnORMel8SYpdcng2Ip7RLsaGuXbzDy3WSVnNs= 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-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 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) Subject: Re: cygpath -w converts relative paths to absolute windows paths To: cygwin AT cygwin DOT com References: <10eb657d-a00b-1609-a9b9-6373092c1ac1 AT polyhack DOT io> <357614277 DOT 20170207183005 AT yandex DOT ru> From: cyg Simple Message-ID: <77e64e0a-0280-46d7-32d1-9b0b3a301135@gmail.com> Date: Tue, 7 Feb 2017 18:13:55 -0500 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 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