delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/28/09:00:44

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:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=PY4kooV44QfVDZa8K7ng+06yAx3CoOGTZMsVh2CFyvhAuLbAwcFR8
ebnXhQw52ha5OLTDCLh1KnRgTm/DkFCzMz7oc0bvYcBkOjrV4GoSR/F8Pcz0hxHV
F0Us3wbey9s8NbXcNr5eQlX7sIfFj91+VSbw1zrT0XvcwRcfKiKH8c=
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:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=X3PHZC73X+7ZffKDskM4MR4mnBQ=; b=kqU+webTkbsE6P4Xc5MZzKCIFpHv
ZxPZ2MNwsJcuJunSXlIop9+UPIHGzpgWADdXhX48OEtNlRmDKhu8KnBILWm+UP1S
aOQgw3lU+0QEa2JURQvu6ptTmMRYrHWysOIdChoonw2hD0nqwSOfXYRgmGRIJpEd
sJjeJJcGE4KnJ3c=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-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
Date: Wed, 28 Aug 2019 14:59:39 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: Eric Blake <eblake AT redhat DOT com>
Cc: cygwin AT cygwin DOT 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 AT cygwin DOT com
Mail-Followup-To: Eric Blake <eblake AT redhat DOT com>, cygwin AT cygwin DOT com
References: <bc3df101ab93c20b86c3ab7fa7d3ea4f AT xs4all DOT nl> <20190827152549 DOT GY11632 AT calimero DOT vinschen DOT de> <a47cc167b725c08e6f1c914166fabcaf AT smtp-cloud8 DOT xs4all DOT net> <3E262D05-F393-453A-9E43-B248DDE50812 AT solidrocksystems DOT com> <b97e4dbe952154efc68412540514ae81 AT smtp-cloud8 DOT xs4all DOT net>
MIME-Version: 1.0
In-Reply-To: <b97e4dbe952154efc68412540514ae81@smtp-cloud8.xs4all.net>
User-Agent: Mutt/1.11.3 (2019-02-01)

--rPmXGPzJgW8hDxFD
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 <eblake AT redhat DOT com>=09
>         Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) <=3D=3D=3D=3D
> committer	Eric Blake <eblake AT redhat DOT com>=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"

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019