From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97283 invoked by alias); 28 Aug 2019 12:59:52 -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 97267 invoked by uid 89); 28 Aug 2019 12:59:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-102.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Aug 2019 12:59:42 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MLR9p-1hl13Y3l6h-00IV8v for ; Wed, 28 Aug 2019 14:59:39 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 6A708A804B1; Wed, 28 Aug 2019 14:59:39 +0200 (CEST) Date: Wed, 28 Aug 2019 13:22:00 -0000 From: Corinna Vinschen To: Eric Blake Cc: cygwin@cygwin.com Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... Message-ID: <20190828125939.GL11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: Eric Blake , cygwin@cygwin.com References: <20190827152549.GY11632@calimero.vinschen.de> <3E262D05-F393-453A-9E43-B248DDE50812@solidrocksystems.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rPmXGPzJgW8hDxFD" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00365.txt.bz2 --rPmXGPzJgW8hDxFD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2207 On Aug 28 09:16, Houder wrote: > On Tue, 27 Aug 2019 11:44:17, Vince Rice wrote: >=20 > > > 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. > >=20 > > 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. >=20 > Right, "Corinna" Number Three. >=20 > Before I sent my question to the list, I had fired up the debugger and > lured it in providing me the neccessary info: >=20 > It showed me that my input (e:\) was being "mutilated" at the start of > mkdir() in winsup/cygwin/dir.cc >=20 > Using git I had found the "suspicious-looking" commit by Eric Blake: >=20 > - https://cygwin.com/git/gitweb.cgi?p=3Dnewlib-cygwin.git;a=3Dcommit;h= =3D52dba6a5c45e8d8ba1e237a15213311dc11d91fb > ( Fix some POSIX-compliance bugs in link, rename, mkdir. ) >=20 > -- > author Eric Blake =09 > Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) <=3D=3D=3D=3D > committer Eric Blake =09 > Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) > commit 52dba6a5c45e8d8ba1e237a15213311dc11d91fb > -- >=20 > Note September 2009! (as hinted by Corinna's alter ego) Eric, any insight? As usual our comments from way back when are lacking in terms of what exact problem this code is trying to fix/workaround. Given this case, I wonder if we really need this code or if we can't just drop it. Of course, it would be great to learn what bordercase this code was trying to handle and if there isn't another way to do that. Corinna --=20 Corinna Vinschen Cygwin Maintainer --rPmXGPzJgW8hDxFD Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1mersACgkQ9TYGna5E T6C7Vw/+K2v9WFpluCx4zbN7k2C+BWyCW0HqxecvZVd8XyT26WU5egzjKg0gwRqR 77cOa5ZwCJvd+Ul6oMF1Hcqfw/cGPf6QFvDsAp5mZmOFOz/rmaUw3seblnFcZsA4 KfYck0UT6ry+kuDZmPRl86gc+sWUSDiOl9NtzhbGmoGR+i6BugzZhZCW4MPVD0nP TJzS7OBLYFT4gAGRkA2aB0SRQ45gXrXe6IDaVp/J6eb7wqReFf+7jcGkTm9c+Vic p0L8241DNywxidcstzMaZefsH3OfHGORjPE4gPGfM7YkWCFV0QezwIVS8amINNcO Nd374Q/UUlvDfn7nD0ILKHlupPci3zZDoD2MX7/yfzYvtl70vDqclVtRv8/kEaQL xpbKkL9suvWOzZtc06gxivpcNloqPAiaR9ENBkxN7g7L/dqhBa+vFgJphePAb+wQ mmvdiT0xa1rFKm/Wz5bN7gZgMiNsk9wIMz2GQucuDaBr5PGe+S4w5HiVZfV2BMs5 wo4dtb7d35NxDPgdFMbDjP/TgcsqH4dk/f4QDmagWezHR3nYRz9VubYEuvEp7479 RAFyLVj/XtG8EwcD4ua1vPhy38uiCMetdv/w2p7Pr+4NYe8W9wEISMDcRdjMIRF3 tgXFLNGJ5wxmdPMjFRE2H0iuwqlujZdbjxE7K6j41Wft8a9bGoM= =OreI -----END PGP SIGNATURE----- --rPmXGPzJgW8hDxFD--