bug in rmdir(2)
Christopher Faylor
cgf-no-personal-reply-please@cygwin.com
Thu Sep 29 00:40:00 GMT 2005
On Wed, Sep 28, 2005 at 04:46:45PM -0400, Larry Hall wrote:
>At 04:31 PM 9/28/2005, you wrote:
>>POSIX requires resolving a filename with a trailing slash as
>>though . were implicitly present, and requires rmdir(2) to fail
>>with EINVAL if the final component is '.'. Therefore, both of
>>these cases should fail rather than removing the directory:
>>
>>$ mkdir a b
>>$ rmdir a/ b/.
>>$ ls a b # Oops, rmdir("a/") and rmdir("b/.") incorrectly succeeded
>>ls: a: No such file or directory
>>ls: b: No such file or directory
>
>
>But that conflicts with Windows semantics, doesn't it? If this is important
>enough for 'rmdir', I suppose you could patch it to give you the behavior
>you describe. But making Cygwin work this way internally is playing with
>the already complex path processing code. I can't see the gain to support
>this corner case and slow down everything else.
LARRY! LARRY! It's POSIX! It's POSIX, I tell you man! Are you daft?
We don't argue with POSIX!
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list