MCPcopy Create free account
hub / github.com/coreutils/coreutils / mark_ancestor_dirs

Function mark_ancestor_dirs

src/remove.c:375–385  ·  view source on GitHub ↗

Upon unlink failure, or when the user declines to remove ENT, mark each of its ancestor directories, so that we know not to prompt for its removal. */

Source from the content-addressed store, hash-verified

373 each of its ancestor directories, so that we know not to prompt for
374 its removal. */
375static void
376mark_ancestor_dirs (FTSENT *ent)
377{
378 for (FTSENT *p = ent->fts_parent; FTS_ROOTLEVEL <= p->fts_level;
379 p = p->fts_parent)
380 {
381 if (p->fts_number)
382 break;
383 p->fts_number = 1;
384 }
385}
386
387/* Remove the file system object specified by ENT. IS_DIR specifies
388 whether it is expected to be a directory or non-directory.

Callers 2

exciseFunction · 0.85
rm_ftsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected