Skip to content

Commit 8e19574

Browse files
fix: Corrected a minor error
1 parent 53b546e commit 8e19574

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/backups.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function remove_files() {
152152
mapfile -t all_files < <(find "${MYBASEDIR}" -type f -printf "%T@ %p\n" | sort -nr | cut -d' ' -f2-)
153153
mapfile -t old_files < <(find "${MYBASEDIR}" -type f -mmin +${TIME_MINUTES} -printf "%T@ %p\n" | sort -n | cut -d' ' -f2-)
154154
#We need to substract globals.sql
155-
number_of_files=${#all_files[@]}-1
155+
number_of_files=$(( ${#all_files[@]} - 1 ))
156156
keep_count=$(( number_of_files < MIN_SAVED_FILE ? ${#all_files[@]} : MIN_SAVED_FILE ))
157157
max_deletable=$(( number_of_files - keep_count ))
158158
deletable=()

0 commit comments

Comments
 (0)