From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107376 invoked by alias); 7 Sep 2019 03:47:04 -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 107336 invoked by uid 89); 7 Sep 2019 03:47:02 -0000 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 Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Sep 2019 03:47:01 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x873kuPK043062 for ; Fri, 6 Sep 2019 20:46:58 -0700 Message-ID: <5D732830.3090208@tlinx.org> Date: Sat, 07 Sep 2019 03:47:00 -0000 From: L A Walsh 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: <20190827152549.GY11632@calimero.vinschen.de> <3E262D05-F393-453A-9E43-B248DDE50812@solidrocksystems.com> <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 X-SW-Source: 2019-09/txt/msg00066.txt.bz2 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