When considering temporary files for deletion, don't examine the mtime

and atime only, but also the ctime.  Otherwise, files extracted from
tar or zip archives will immediately be declared stale since they've
got their mtime reset to the original mtime.

Reviewed by:	brian
MFC after:	1 week
This commit is contained in:
Joerg Wunsch 2002-10-06 18:48:20 +00:00
parent 695df15da2
commit 6e84ba78c1

View File

@ -27,6 +27,7 @@ case "$daily_clean_tmps_enable" in
set -f noglob set -f noglob
args="-atime +$daily_clean_tmps_days -mtime +$daily_clean_tmps_days" args="-atime +$daily_clean_tmps_days -mtime +$daily_clean_tmps_days"
args="${args} -ctime +$daily_clean_tmps_days"
[ -n "$daily_clean_tmps_ignore" ] && [ -n "$daily_clean_tmps_ignore" ] &&
args="$args "`echo " ${daily_clean_tmps_ignore% }" | args="$args "`echo " ${daily_clean_tmps_ignore% }" |
sed 's/[ ][ ]*/ ! -name /g'` sed 's/[ ][ ]*/ ! -name /g'`