File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -736,13 +736,11 @@ run_recycle_bin_cleanup() {
736736 local threshold_timestamp
737737 threshold_timestamp=$( date -d " $retention_days days ago" +%s)
738738 while IFS= read -r folder; do
739- if [[ " $folder " =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
740- local folder_timestamp
741- folder_timestamp=$( date -d " $folder " +%s)
742- if (( folder_timestamp < threshold_timestamp )) ; then
743- folders_to_delete+=" ${folder} " $' \n '
744- fi
745- fi
739+ if [[ " $folder " =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] && folder_timestamp=$( date -d " $folder " +%s 2> /dev/null) ; then
740+ if (( folder_timestamp < threshold_timestamp )) ; then
741+ folders_to_delete+=" ${folder} " $' \n '
742+ fi
743+ fi
746744 done <<< " $all_folders"
747745 if [[ -n " $folders_to_delete " ]]; then
748746 log_message " Removing old recycle bin folders:"
You can’t perform that action at this time.
0 commit comments