From d532ac83da708daf55b1318f821f33aebd21eae4 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 28 Jan 2023 16:20:51 +0100 Subject: [PATCH] client: declare variable earlier --- client/lib/main.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/lib/main.sh b/client/lib/main.sh index deb8275..b8723d0 100644 --- a/client/lib/main.sh +++ b/client/lib/main.sh @@ -193,6 +193,9 @@ sync() { printf "" > "${RSYNC_STATSFILE}" fi + # Initialize variable here, we need it later + local -a mtree_files=() + if [ "${MTREE_ENABLED}" = "1" ]; then mtree_bin=$(command -v mtree) @@ -200,10 +203,7 @@ sync() { # Dump filesystem stats with mtree log "SYNC_TASKS - start mtree" - local -a mtree_files=() - # Loop over Rsync includes - for i in "${!rsync_includes[@]}"; do include="${rsync_includes[i]}"