Fix broken conditional check that identifies whether content is cached in order to clean it.

This commit is contained in:
Nolan Darilek 2017-03-14 14:58:51 -05:00
parent 26eaf5114b
commit 3d2cf298bf

View File

@ -65,8 +65,7 @@ function cleanup()
-mindepth 1 -type d -empty -delete -mindepth 1 -type d -empty -delete
# remove files older than ${retention_days} days from the cache # remove files older than ${retention_days} days from the cache
if [ -e "${data_path}"/cache/?/ ] if [ ! -z "$(ls -A $data_path/cache)" ]; then
then
find "${data_path}"/cache/?/ -type f -mtime +${retention_days} -delete find "${data_path}"/cache/?/ -type f -mtime +${retention_days} -delete
fi fi
} }