bug#39364: [PATCH] rmdir: fix clobbered errno

2020-02-01 Thread Jim Meyering
On Fri, Jan 31, 2020 at 9:55 AM Pádraig Brady wrote: > ... > This looks like a regression introduced in v6.10-21-ged5c4e7 > I.E. is_empty_dir() is globbering errno, and thus > a non specific and non terminating warning is output, > rather than a specific error, and exit. FTR, here's a minimal tes

bug#39364: [PATCH] rmdir: fix clobbered errno

2020-02-01 Thread Jim Meyering
Nice find and thank you for the patch. That's a 12-year-old bug I introduced. I confirm: with 6.10, running this: mkdir -p a/b && chmod a-w a && rmdir --ignore a/b prints this and exits nonzero: rmdir: failed to remove `a/b': Permission denied With 6.11 and newer, it silently succeeds. On Fri