delorie.com/archives/browse.cgi | search |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=ubgn | |
bp7s4n9zkPFR8T1M2Ab2RweVkzME3ssRjSH0wJ9JYtSju+BdiY5AzuBi1nC2rmGj | |
aXxs8pSpNvVgAcImNMGKvh4poGzUn6LjP1uF92xqA9vBsEeBplqbYEQWPfwJV7h5 | |
23kWR02LgIZA41O+ef89C4BHHFuOhPDKLrg3rds= | |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=hIAvl4mFQy | |
Dp3HRZai1yxEMOeR0=; b=jnG2OGW5oR/gvGKCauO44G5jBlJvGxk2uIATi4nMjg | |
R/v2mefWBnTbzNGTbzibk5Brzk1VGFBYYj8bNMc84BTUvzMNKXwxt7qTmA8sNAni | |
5uF530UZoA8lDk1fjsipJCLhbWAeDoxEf/OvxbESxt1bNPdD3cCCFWelawVsVvcS | |
E= | |
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=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= |
X-HELO: | mx1.redhat.com |
Subject: | Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... |
To: | 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> <20190828125939 DOT GL11632 AT calimero DOT vinschen DOT de> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | preference=signencrypt |
Message-ID: | <421ac447-b249-da21-1ca5-228041cfc884@redhat.com> |
Date: | Wed, 28 Aug 2019 08:36:41 -0500 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <20190828125939.GL11632@calimero.vinschen.de> |
X-IsSubscribed: | yes |
--JNqU72IbvBM8GcnG5C5WFeHsDUswI5mV6 Content-Type: multipart/mixed; boundary="V2q6vqQW4tAbrjGUQ6PzPJNT4uMfWkpAX"; protected-headers="v1" From: Eric Blake <eblake AT redhat DOT com> To: cygwin AT cygwin DOT com Message-ID: <421ac447-b249-da21-1ca5-228041cfc884 AT redhat DOT com> Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... 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> <20190828125939 DOT GL11632 AT calimero DOT vinschen DOT de> In-Reply-To: <20190828125939 DOT GL11632 AT calimero DOT vinschen DOT de> --V2q6vqQW4tAbrjGUQ6PzPJNT4uMfWkpAX Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/28/19 7:59 AM, 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). Dropping trailing slashes to be Linux-compatible is okay. Dropping trailing backslashes is risky, though, if it makes us forget that the user was asking for a DOS path (even though DOS paths are not always going to work as expected). >=20 > 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. If I recall, we had cases where 'mkdir a/' and 'mkdir a' did not behave identically, even though POSIX says they should; compounded by the fact that Windows treats trailing slash differently when performing native mkdir on a drive than it does on a subdirectory of a drive. It may be as simple as changing the isdirsep() from the identified commit to instead check only for '/' (and ignore '\'). >=20 > 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. >=20 >=20 > Corinna >=20 --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --V2q6vqQW4tAbrjGUQ6PzPJNT4uMfWkpAX-- --JNqU72IbvBM8GcnG5C5WFeHsDUswI5mV6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl1mg2kACgkQp6FrSiUn Q2relQgAqHIASHcD0vE0YYfQYdfXSmlZVXaLgIVRP/+LnrSG6SRqU0m2qjQRBk74 pYy698zpbcjjATqOq4CdFHitxltGUx3Wi7ZCWTuiSQ9LtQ2ve6BWPJebYK5KHiK/ pHMiTkYvce3qrTF8kpn7+6dgS7wZzD9v1nCWM1vBF9eeB51A9hkPE4yj3c6XnUii /0BVU15hmv2OTKv5+HrnHHFi/2b+7g7bDi5SVgT4b9v4fB8YXEqhz6Ku0UPb6Gp+ cd7fXvWMV/uM+1KNukmQIlh7eGJ/FtaS4ch6QmxMoRYOqnV0bbBAAf4K8lfSGvFS 0stTafC+2Wzj3DWI/tRoJ9MOMjx7eA== =PQfp -----END PGP SIGNATURE----- --JNqU72IbvBM8GcnG5C5WFeHsDUswI5mV6--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |