delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/06/13/09:06:01

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=uBmBZyNwpmHOaxw5
TtckydqG8rkfnu7jia00Ab3bdiZgLkBgceUluhcJySbP4PLxScLOv2snqc0/Ps3O
vxgRw0bVOpjy9ad94PWeYZaL/EFtUsdQ0nupSd9jNaPhxzzXMxM9X7kp6tfTxyCi
74Nv16KOBseQal7QlCLWCpYXGwM=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=ETwHWy2KdYm1JvXPp3GSU0
/tVxg=; b=FvjuU9WQKnQu0LgeqfgB7t7iMXjpAhBKCzagM50CNRQ/Fr03/hmo9H
iT0Ve5Wu4ERcZLp6X7LoKvyp5GG0/a5NDBGdOs7sMYSq7bpzm4QaSlrImnBdAXpO
sIQpU19K4BxT1LpElSmlFUbnhVqfM3ZWsmUmIZXOAaBpVbd+2+wh4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=UD:ru, HX-Priority:Normal, H*RU:192.168.1.10, H*r:ip*192.168.1.10
X-HELO: forward104p.mail.yandex.net
Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Wed, 13 Jun 2018 15:50:36 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <183057486.20180613155036@yandex.ru>
To: "Sven Eden" <sven DOT eden AT gmx DOT de>, cygwin AT cygwin DOT com
Subject: Re: Problematic interpretion of paths starting with double slashes
In-Reply-To: <trinity-709441a4-b53d-4bbd-96fb-91ad85816938-1528878894364@3c-app-gmx-bs06>
References: <trinity-82173dac-d842-4a87-8d1f-bed9a958d178-1528793630066 AT 3c-app-gmx-bs08> <dc8418d2-2004-97f0-2d8c-ab438f007eba AT redhat DOT com> <trinity-2aa37c55-032a-4631-9d8f-657ecd85e170-1528809265158 AT 3c-app-gmx-bs08> <00de90b8-a2b4-f751-1ef2-05645a3f1119 AT SystematicSw DOT ab DOT ca> <trinity-709441a4-b53d-4bbd-96fb-91ad85816938-1528878894364 AT 3c-app-gmx-bs06>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Sven Eden!

>> Gesendet: Dienstag, 12. Juni 2018 um 18:28 Uhr
>> Von: "Brian Inglis" <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
>> On 2018-06-12 07:14, Sven Eden wrote:
>> >> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr
>> >> Von: "Eric Blake" <eblake AT redhat DOT com>
>> >> Then fix your script to provide 3 slashes instead of 2. Only 2 slashes
>> >> has the magic UNC behavior.
>> > It is not my script. *my* scripts are portable by all means.
>> >> That is, if you have a script that is concatenating:
>> >> ${prefix}/${dir}
>> >> where ${prefix} might be empty, you can always rewrite it to be:
>> >> ${prefix}///${dir}
>> > The script was "fixed" from ${prefix}/${dir} a while ago. Before that the
>> > outcome was "///". Which is very bad style. Good style is to guarantee, that
>> > not more than one slash is issued.
>>
>> Which is equivalent to //localhost/ on Cygwin and elsewhere - / on Linux - this
>> is semantics not "style".

> I talked about replacing something wrong with something
> worse. That's style, not semantics. But I get what you are
> meaning. ;-)

If it is documented, it is not wrong.


> However, from my two questions, one was answered, and I can
> figure out the other just fine by myself.

> Q: Can the handling of // be extended to check for / if the
> first fails?
> A: Yes

Can? Yes. Purely technically. But for consistency it will not be.
Ambiguous paths are a big no-no.


-- 
With best regards,
Andrey Repin
Wednesday, June 13, 2018 15:48:59

Sorry for my terrible english...


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019