public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: john doe <johndoe65534@mail.com>
To: cygwin@cygwin.com
Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...
Date: Wed, 28 Aug 2019 09:22:00 -0000	[thread overview]
Message-ID: <b26f5382-8cb8-f1d1-713d-96cbfa929a99@mail.com> (raw)
In-Reply-To: <b97e4dbe952154efc68412540514ae81@smtp-cloud8.xs4all.net>

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=newlib-cygwin.git;a=commit;h=52dba6a5c45e8d8ba1e237a15213311dc11d91fb
>    ( Fix some POSIX-compliance bugs in link, rename, mkdir. )
>
> --
> author	Eric Blake <eblake@redhat.com>
>         Sat, 26 Sep 2009 15:51:53 +0000 (15:51 +0000) <====
> committer	Eric Blake <eblake@redhat.com>
>         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

  reply	other threads:[~2019-08-28  8:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 15:25 Houder
2019-08-27 16:28 ` Corinna Vinschen
2019-08-27 17:01   ` Houder
2019-08-27 17:32     ` Vince Rice
2019-08-27 17:50       ` Corinna Vinschen
2019-08-28  7:16       ` Houder
2019-08-28  9:22         ` john doe [this message]
2019-08-28 11:47           ` Houder
2019-08-28 13:22         ` Corinna Vinschen
2019-08-28 14:16           ` Eric Blake
2019-08-28 14:22             ` Corinna Vinschen
2019-08-28 15:18               ` Corinna Vinschen
2019-08-29 15:19                 ` Houder
2019-08-30  8:20                   ` Corinna Vinschen
2019-08-30 12:42                   ` Houder
2019-09-01 17:38                     ` Houder
2019-09-02  8:15                       ` Corinna Vinschen
2019-09-03  8:40                         ` Houder
2019-09-03  6:50                       ` Andrey Repin
2019-09-19 19:51                       ` Ken Brown
2019-09-20  9:11                         ` Houder
2019-09-20 18:20                           ` Houder
2019-09-21 16:07                             ` Ken Brown
2019-09-22  7:34                               ` Houder
2019-09-22 14:12                                 ` Ken Brown
2019-09-07  3:47                 ` L A Walsh
2019-08-27 19:48   ` Achim Gratz
2019-08-27 20:58     ` Brian Inglis
2019-08-28  7:16       ` Corinna Vinschen
2019-08-27 22:21     ` Achim Gratz
2019-08-28 13:36 ` Eric Blake
2019-08-28 22:57   ` Houder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b26f5382-8cb8-f1d1-713d-96cbfa929a99@mail.com \
    --to=johndoe65534@mail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).