]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
rm: remove redundant mark_ancestor_dirs call master
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Oct 2025 20:36:40 +0000 (13:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Oct 2025 20:37:22 +0000 (13:37 -0700)
* src/remove.c (rm_fts): Remove unnecessary call.  Since this code
is executed only when not recursive, there are no ancestors to mark.

src/remove.c

index f50276efd78bbea9a14b59d37fc2a66424547867..86226b1d378754dba9df0773f2240aa507214550 100644 (file)
@@ -454,7 +454,6 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
           if (x->remove_empty_directories)
             return RM_OK;
           error (0, EISDIR, _("cannot remove %s"), quoteaf (ent->fts_path));
-          mark_ancestor_dirs (ent);
           ignore_value (fts_read (fts));
           return RM_ERROR;
         }