GNU bug report logs - #39364
[PATCH] rmdir: fix clobbered errno

Previous Next

Package: coreutils;

Reported by: Matthew Pfeiffer <spferical <at> gmail.com>

Date: Fri, 31 Jan 2020 02:21:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 39364 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigbrady.com>
Cc: 39364 <at> debbugs.gnu.org, Matthew Pfeiffer <spferical <at> gmail.com>
Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno
Date: Mon, 3 Feb 2020 08:35:43 -0800
On Mon, Feb 3, 2020 at 5:28 AM Pádraig Brady <P <at> draigbrady.com> wrote:
...
> Actually I think the key issue is not errno handling,
> but a logic error fixed with:
>
> @@ -102,7 +102,7 @@ ignorable_failure (int error_number, char const *dir)
>     return (ignore_fail_on_non_empty
>             && (errno_rmdir_non_empty (error_number)
>                 || (errno_may_be_empty (error_number)
> -                  && is_empty_dir (AT_FDCWD, dir))));
> +                  && ! is_empty_dir (AT_FDCWD, dir))));

Nice! Thanks for tracking that down. The patch looks great.
You might want to mention (in the log) the commit that introduced the
bug, since you already did the work to track it down:
v6.10-21-ged5c4e7

I preferred to require that for each NEWS-worthy bug fix, because
otherwise, it can be costly to re-derive or dig up in mail archives.




This bug report was last modified 5 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.