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 @@ -462,13 +462,11 @@ run_recycle_bin_cleanup() {
462462 local threshold_timestamp
463463 threshold_timestamp=$( date -d " $retention_days days ago" +%s)
464464 while IFS= read -r folder; do
465- if [[ " $folder " =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
466- local folder_timestamp
467- folder_timestamp=$( date -d " $folder " +%s)
468- if (( folder_timestamp < threshold_timestamp )) ; then
469- folders_to_delete+=" ${folder} " $' \n '
470- fi
471- fi
465+ if [[ " $folder " =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] && folder_timestamp=$( date -d " $folder " +%s 2> /dev/null) ; then
466+ if (( folder_timestamp < threshold_timestamp )) ; then
467+ folders_to_delete+=" ${folder} " $' \n '
468+ fi
469+ fi
472470 done <<< " $all_folders"
473471 if [[ -n " $folders_to_delete " ]]; then
474472 log_message " Removing old recycle bin folders:"
You can’t perform that action at this time.
0 commit comments