X-Recipient: archive-cygwin@delorie.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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=FtWng1C3ojJUmviw9CZWvpkZjCqFoIQ3sIUlJOYkngv
	y0bPSm8pf+pmRDEmi8wzf4cYJRHV02CjzyzB+QNr2oCu51qukG9nyYQDsarHPnmN
	wxh5e4VPlKSMirEzuIwOlZ8EYM9h4TZcCaNQW3yUt3o583DoJ8Mw40Ws5cmI4w0w
	=
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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=DJA4hZ51xWoNxfKJX9chCxvmUno=; b=li+ZB64Gwtv5WGe4q
	faQnfnjhETaqylewCHpA7CXi78KdldQz10hjQGi9z01Dhzk7GNVECB7hTPI7L4oh
	tFtaCqaR6dptze53b6+l5fBHDgxsmgtWcT2aamXZchP/X5IdyDY4TruwlyG+OWsy
	A658GoOryGuFuV6hztDx3PzvXc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,KHOP_HELO_FCRDNS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:957
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <5D732830.3090208@tlinx.org>
Date: Fri, 06 Sep 2019 20:46:56 -0700
From: L A Walsh <cygwin@tlinx.org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...
References: <bc3df101ab93c20b86c3ab7fa7d3ea4f@xs4all.nl> <20190827152549.GY11632@calimero.vinschen.de> <a47cc167b725c08e6f1c914166fabcaf@smtp-cloud8.xs4all.net> <3E262D05-F393-453A-9E43-B248DDE50812@solidrocksystems.com> <b97e4dbe952154efc68412540514ae81@smtp-cloud8.xs4all.net> <20190828125939.GL11632@calimero.vinschen.de> <421ac447-b249-da21-1ca5-228041cfc884@redhat.com> <20190828141556.GM11632@calimero.vinschen.de> <20190828142220.GN11632@calimero.vinschen.de>
In-Reply-To: <20190828142220.GN11632@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

On 2019/08/28 07:22, Corinna Vinschen wrote:
> One problem here is, what to do about border cases like
>
>   $ mkdir a\/\/\/
>
> In theory slashes and backslashes should both be treated as dir
> separators.  Handling a case like this so that all expectations
> are satisfied is next to impossible, I guess.
>   
In a shell or as a quoted literal?  Under POSIX or under Windows?

In a shell it ends up as:

> pathcat a\/\/\/\/ b
a/b
> pathcat a\/\/ b
a/b

But as a quoted string, things don't get reduced unless last of first +
first of second are same:

> pathcat 'a\/\/' 'b'
a\/\/b                  # cuddled
> pathcat 'a\/\/' '/b'
a\/\/b                  # slash reduced
pathcat 'a\/\/' '\/b'
a\/\/\/b                # concat
pathcat 'a\/\' '\/b'
a\/\/\/b               # slash added as "\/b is assumed to be at ./\/b

Note that while posix may specify that mkdir 'a' and 'a/' should be the
same,
'a:' and 'a:\' are not (and would not be POSIX compliant).






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

