mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-09 21:53:55 +02:00
(remove_parents): Use the correct test
(same as in main) in handling --ignore-fail-on-non-empty. From Michael Stone.
This commit is contained in:
10
src/rmdir.c
10
src/rmdir.c
@@ -101,11 +101,15 @@ remove_parents (char *path)
|
||||
|
||||
if (fail)
|
||||
{
|
||||
/* Give a diagnostic and set fail if not --ignore. */
|
||||
if (!ignore_fail_on_non_empty || errno != ENOTEMPTY)
|
||||
/* Stop quietly if --ignore-fail-on-non-empty. */
|
||||
if (ignore_fail_on_non_empty
|
||||
&& (errno == ENOTEMPTY || errno == EEXIST))
|
||||
{
|
||||
fail = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
error (0, errno, "%s", path);
|
||||
fail = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user