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:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Dt2byb5ReFBmSUTaXXLdZrStFz1ETLewGCvjX/u8tu9HA+FVbdiCh o5k2becdSOoZg3aj76H0vEPzw7F9Iv4EStut/7YujmwOB9DfF9MU7BMiP99mKU0s 779UzcNnwp8Cjd+ixagXwKc5Kbj0ILK8g5vLFlcjfNQPKow2AR93ps= 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:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=vyiWw1pGfiy50KVo4jndW9gNzcg=; b=x+lMzgX8aQBhAB1+doBTlq/cPYZ2 qWS3OnYwEN3MHXA3+ZheeXLoJFpGenEDdhgowqSSWdR5IuHI972ePayRF4GRvjvP 7DDEpY3sGgEWNiUGWldqd4r8NFEOXuYAiIdVe8htYiQXA4Y/vDsw6uZGuInStXB9 06TKe9udr+Y2DMU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.0 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=houder, Houder, HX-Languages-Length:1359, play X-HELO: mout.kundenserver.de Date: Tue, 27 Aug 2019 17:25:49 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ... Message-ID: <20190827152549.GY11632@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rZqMZkSWbCsTbv0S" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) --rZqMZkSWbCsTbv0S Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 27 14:51, Houder wrote: > L.S., >=20 > # note: cygdrive has been remapped to /drv at my place >=20 > 64-%% uname -a > CYGWIN_NT-6.1 Seven 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin > 64-%% mkdir /drv/e > mkdir: cannot create directory =E2=80=98/drv/e=E2=80=99: Permission denied >=20 > 64-@@ uname -a > CYGWIN_NT-6.1 Seven 3.1.0(0.340/5/3) 2019-08-19 10:13 x86_64 Cygwin > 64-@@ mkdir /drv/e > mkdir: cannot create directory =E2=80=98/drv/e=E2=80=99: File exists >=20 > Different error report (which was the objective of Ben Wijen): >=20 > https://cygwin.com/ml/cygwin-patches/2019-q2/msg00136.html >=20 > Now, let's play: >=20 > 64-@@ cygpath -w /drv/e > E:\ >=20 > 64-@@ mkdir 'e:\' # creates subdirectory e: !!!!! > 64-@@ rmdir 'e:\' # fails, because it refers to /drv/e > rmdir: failed to remove 'e:\': Directory not empty >=20 > 64-@@ rmdir 'e:' >=20 > Yes, I should NOT use "DOS paths" ... >=20 > https://cygwin.com/cygwin-ug-net/using.html#pathnames-win32 >=20 > However, I wonder why e:\ is interpreted by mkdir as e:, and as > /drv/e (that is as e:\) by rmdir. >=20 > Any reason for this remarkable difference? 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). Corinna --=20 Corinna Vinschen Cygwin Maintainer --rZqMZkSWbCsTbv0S Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1lS30ACgkQ9TYGna5E T6Ac/g//Qaudhk62pj4JEqILrzXbGHBIwrLfZmPaRjhBX3goEwFWD/ZYS+FQZhJ1 EdspXe3FARpTetGul+eFQgld+fsn1zGsSpFDBaecGbD1OLthIxRDcGVxBWAChdc+ E2eJwubdynSrwCcs8actMpii45G//kZE5MZN2j3JruGBbh/mw+PMOHUp59FeyoOw SVhvyJWDj/UHh1r+5TnSwQaODKGaKygwjmvywVxxmxQueZS08DyBMmpawfcZWxVg yL/etnHEu/VOKMeMvH+MkEsRcwN8waDlwQG7Kts1yGifH4GAqfVzt9zdTGJ3MYcx YV6wzm+e59Z/ZGSAK7JWHjs1ceWcQ3NBPV16r8vHmfQP3IyrtNG/X80D428NTMgh tyJBZUYKi7tqGn+6xK0VoVPOt3873VZZk97TI/mLisTRi+mgRv2GgY/HajDB/ZR3 0zD4014JvA2z4beYafh4G3/MBaCMZm05qEOf3UvNvb0e7zbrDWvuFwnHK5zW8tEG GCCUwS/fVWQvDB/aBh2IW+fTbL4xPVFous+cBZQWfOlvMbyIqPMPpQh9AO/Z80b9 z1/SRJB2QfK31zRNa+6y2KyIiF4knkHlHiyPpSC8mRnpia59kQn1WrIroMLVMyYC Pyjujf08ZG+Q8i86byhxnGCT7M5kx8PtJJSB2XyIBqMrjkYHfYE= =pgji -----END PGP SIGNATURE----- --rZqMZkSWbCsTbv0S--