summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/find/function.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c
index 5120113..e5d7106 100644
--- a/usr.bin/find/function.c
+++ b/usr.bin/find/function.c
@@ -972,7 +972,7 @@ f_delete(plan, entry)
/* rmdir directories, unlink everything else */
if (S_ISDIR(entry->fts_statp->st_mode)) {
- if (rmdir(entry->fts_accpath) < 0)
+ if (rmdir(entry->fts_accpath) < 0 && errno != ENOTEMPTY)
warn("-delete: rmdir(%s)", entry->fts_path);
} else {
if (unlink(entry->fts_accpath) < 0)
OpenPOWER on IntegriCloud