From 16f0d4233558642f0611804374d15aec39b3c681 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Thu, 23 Jan 2025 00:17:46 +0100 Subject: [PATCH] getFiles: better handling of path pruning --- lib/files/getFiles | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/files/getFiles b/lib/files/getFiles index 51feaf3..dc64693 100644 --- a/lib/files/getFiles +++ b/lib/files/getFiles @@ -3,7 +3,7 @@ getFiles() { scantime=$(date +%s) for prune_expression in "${skippeddirectories[@]}" do - prunes+="-path $sourcepath$prune_expression -prune -o " + prunes+=( -path "$sourcepath$prune_expression" -prune -o ) done (( cron )) || echo -n "Scanning $sourcepath... " # We probably have thousands of files, don't waste time on disk writes @@ -56,7 +56,7 @@ getFiles() { fi progressSpin done < <( - find "$sourcepath" $prunes -type f -printf "%T@ %s %P\n" + find "$sourcepath" "${prunes[@]}" -type f -not -name '.*' -printf "%T@ %s %P\n" ) echo 'COMMIT;' >&3 (( cron )) || echo -n $'\r'