Skip to content

Commit f2237dd

Browse files
authored
Update README.md
1 parent 15c9af8 commit f2237dd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff 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:"

0 commit comments

Comments
 (0)