summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-10-05 23:47:07 +0000
committerpeter <peter@FreeBSD.org>1996-10-05 23:47:07 +0000
commit1fb5e546cf82a6f89790cee4a2d74aaad43ea382 (patch)
tree2f21f29bbdfb9873b50c3b29f86b5ab1e00f9184 /usr.bin/find
parent92313ed7f021e8c60b5432d68b33d5fff17e1892 (diff)
downloadFreeBSD-src-1fb5e546cf82a6f89790cee4a2d74aaad43ea382.zip
FreeBSD-src-1fb5e546cf82a6f89790cee4a2d74aaad43ea382.tar.gz
With -delete, don't complain about non-empty directories. Otherwise
"cd /tmp; find . -mtime +7 -delete" is excessively noisy.
Diffstat (limited to 'usr.bin/find')
-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