mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 22:36:24 +01:00
With -delete, don't complain about non-empty directories. Otherwise
"cd /tmp; find . -mtime +7 -delete" is excessively noisy.
This commit is contained in:
parent
ad8b2071ac
commit
3598e52ce6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18720
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user