1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

Don't try to remove directories unless we've emptied them first

Submitted by:	NIIMI Satoshi <sa2c@and.or.jp>
PR:		28355
MFC after:	1 week
This commit is contained in:
Brian Somers 2001-07-19 12:08:24 +00:00
parent 35904a3be8
commit cce7f73d72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79956

View File

@ -41,7 +41,7 @@ case "$daily_clean_tmps_enable" in
do
[ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && {
find -d . -type f $args -delete $print
find -d . ! -name . -type d -mtime \
find -d . ! -name . -type d -empty -mtime \
+$daily_clean_tmps_days -delete $print
} | sed "s,^\\., $dir,"
done | tee /dev/stderr | wc -l)