From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70681 invoked by alias); 28 Aug 2019 08:32:42 -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 70673 invoked by uid 89); 28 Aug 2019 08:32:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=Who, his X-HELO: mout.gmx.com Received: from mout.gmx.com (HELO mout.gmx.com) (74.208.4.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Aug 2019 08:32:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1566981149; bh=MZ9z0VkZy3HjsyzAFImGmskssGGWSxXRv/HRHxww8+M=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=Ft6ZT7FEojbTP60H+ibvEC4ffUbmBlIHRwg5TJpas6PY80fGggRtHC3IqjKU+BBaV mMwLEtooDGla6jXkVkRmL3U5ZJopKHRAWloPOprxBhVJbEfK8aTjIgsY+Cae/zKH0G m1H0f30eVc3Oh/81gXPBWMjSdwXpN8HhuUvHQz5s= X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 Received: from johndoe65534.mail.com ([213.214.34.30]) by mail.gmx.com (mrgmxus001 [74.208.5.15]) with ESMTPSA (Nemesis) id 0MbxZo-1hji6E2JGg-00JJap for ; Wed, 28 Aug 2019 10:32:29 +0200 Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... To: cygwin@cygwin.com References: <20190827152549.GY11632@calimero.vinschen.de> <3E262D05-F393-453A-9E43-B248DDE50812@solidrocksystems.com> From: john doe Message-ID: Date: Wed, 28 Aug 2019 09:22:00 -0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00356.txt.bz2 On 8/28/2019 9:16 AM, Houder wrote: > On Tue, 27 Aug 2019 11:44:17, Vince Rice wrote: > >>> On Aug 27, 2019, at 11:28 AM, Houder wrote: >>> >>> On Tue, 27 Aug 2019 17:25:49, Corinna Vinschen wrote: >>>> >>>> mkdir(2) has some special code from 2009 which drops trailing >>>> {back}slashes to perform a bordercase in mkdir Linux-compatible. >>>> This code snippet doesn't exist in rmdir(2). >>> >>> .. uhm, I must be speaking to the alter ego of Corinna V,. because >>> as far as I know, Corinna has given herself some time off ... >>> >>> Perhaps you could make an entry in her "TODO list" that the 3 lines >>> above requires some more explanation for pour souls like me. >> >> I am not Corinna, but I read that as >> The mkdir command works because it has special code added to it to make >> it work. The rmdir command doesn't work because it doesn't have the same >> code in it. > > Right, "Corinna" Number Three. > > Before I sent my question to the list, I had fired up the debugger and > lured it in providing me the neccessary info: > > It showed me that my input (e:\) was being "mutilated" at the start of > mkdir() in winsup/cygwin/dir.cc > > Using git I had found the "suspicious-looking" commit by Eric Blake: > > - https://cygwin.com/git/gitweb.cgi?p=3Dnewlib-cygwin.git;a=3Dcommit;h= =3D52dba6a5c45e8d8ba1e237a15213311dc11d91fb > ( Fix some POSIX-compliance bugs in link, rename, mkdir. ) > > -- > author Eric Blake > Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) <=3D=3D=3D=3D > committer Eric Blake > Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) > commit 52dba6a5c45e8d8ba1e237a15213311dc11d91fb > -- > > Note September 2009! (as hinted by Corinna's alter ego) > > In short, neither the answer by Corinna's alter ego nor your translation > raised the level of the knowledge that I had already acquired. > > Linux-compat. Really? > > Who in his right mind would want to create a subdirectory e:\ on Linux? > > ls -ld 'e:\' > stat 'e:\' > touch 'e:\' > rmdir 'e:\' > > all refer to /drv/e # /cygdrive/e if not remapped > > Only mkdir does NOT. > > And I am the only one who finds this a bit odd? That why I asked: why > cannot mkdir and rmdir be symmetrical w/ respect to e:\ ? > > Because of Linux? Weird. > > Now I have to tell a newbie on Cygwin, that he should use > > mkdir 'e:\.' BUT rmdir 'e:\' > > in order to observe the same results as the Windows equivalents do. > > (yes, he should use mkdir /drv/e and rmdir /drv/e) > > Tampi. > As hinted out in here, backporting the code snippet from mkdir to rmdir would solve your issue. -- John Doe -- 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