1
0
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:
Jim Meyering
1999-11-07 08:38:50 +00:00
parent 691513e7f3
commit 3db1aef04e

View File

@@ -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;
}