From 26518c8bc3d4ea8454fc60cd2c435b0f32aa6cb1 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Sat, 11 Oct 2025 21:55:16 +0200 Subject: [PATCH] getFiles: use NULL as separator --- lib/files/getFiles | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/files/getFiles b/lib/files/getFiles index f6c28db..dde6cab 100644 --- a/lib/files/getFiles +++ b/lib/files/getFiles @@ -8,7 +8,7 @@ getFiles() { (( cron )) || echo -n "Scanning $sourcepath... " # We probably have thousands of files, don't waste time on disk writes echo 'BEGIN TRANSACTION;' >&3 - while read time size filename + while read -d $'\0' time size filename do if ! Select source_files id >/dev/null <<-EOWhere filename = $filename @@ -56,7 +56,7 @@ getFiles() { fi progressSpin done < <( - find "$sourcepath" "${prunes[@]}" -type f -not -name '.*' -printf "%T@ %s %P\n" + find "$sourcepath" "${prunes[@]}" -type f -not -name '.*' -printf "%T@ %s %P\0" ) echo 'COMMIT;' >&3 (( cron )) || echo -n $'\r'