diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/rm/rm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 7458dd0..ccacc18 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -199,8 +199,8 @@ rm_tree(char **argv) errx(1, "%s: %s", p->fts_path, strerror(p->fts_errno)); case FTS_NS: /* - * FTS_NS: assume that if can't stat the file, it - * can't be unlinked. + * Assume that since fts_read() couldn't stat the + * file, it can't be unlinked. */ if (!needstat) break; @@ -269,6 +269,14 @@ rm_tree(char **argv) } break; + case FTS_NS: + /* + * Assume that since fts_read() couldn't stat + * the file, it can't be unlinked. + */ + if (fflag) + continue; + /* FALLTHROUGH */ default: if (Pflag) if (!rm_overwrite(p->fts_accpath, NULL)) |