mirror of
git://git.sv.gnu.org/coreutils
synced 2026-06-06 07:42:21 -04: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:
+7
-3
@@ -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