From 1f443fe57291918ba245b2ffb7cdc07e64630af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 30 Jan 2020 20:46:40 -0500 Subject: rmdir: fix --ignore-fail-on-non-empty with permissions errors Since v6.10-21-ged5c4e7 `rmdir --ignore-fail-on-non-empty` had reversed the failure status for directories that failed to be removed for permissions reasons. I.E. it would have returned a failure status for such non empty dirs, and vice versa. * src/rmdir.c (errno_may_be_non_empty): Rename from the more confusing errno_may_be_empty(), and remove the EEXIST case (specific to Solaris), which is moot here since handled in errno_rmdir_non_empty(). (ignorable_failure): Fix the logic error so that _non_ empty dirs are deemed to have ignorable failures. (main): Fix clobbering of errno by is_empty_dir(). (remove_parents): Likewise. * tests/rmdir/ignore.sh: Add a test case. * THANKS.in: Add reporter who fixed the errno handling. * NEWS: Mention the bug fix. Fixes https://bugs.gnu.org/39364 --- THANKS.in | 1 + 1 file changed, 1 insertion(+) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 23b089754..48f6c04c7 100644 --- a/THANKS.in +++ b/THANKS.in @@ -421,6 +421,7 @@ Matthew Arnison maffew@cat.org.au Matthew Braun matthew@ans.net Matthew Clarke Matthew_Clarke@mindlink.bc.ca Matthew M. Boedicker matthewm@boedicker.org +Matthew Pfeiffer spferical@gmail.com Matthew S. Levine mslevine@theory.lcs.mit.edu Matthew Smith matts@bluesguitar.org Matthew Swift swift@alum.mit.edu -- cgit v1.2.1