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: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 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-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 User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... References: <20190827152549 DOT GY11632 AT calimero DOT vinschen DOT de> <3E262D05-F393-453A-9E43-B248DDE50812 AT solidrocksystems DOT com> <20190828125939 DOT GL11632 AT calimero DOT vinschen DOT de> <421ac447-b249-da21-1ca5-228041cfc884 AT redhat DOT com> <20190828141556 DOT GM11632 AT calimero DOT vinschen DOT de> <20190828142220 DOT GN11632 AT calimero DOT vinschen DOT 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