From c5815669e2c62730e0eed1c2d5dd6819c991bd69 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 10 Nov 2025 15:33:55 +0100 Subject: [PATCH] copy: use NULL in reads from db --- lib/copy/action | 4 ++-- lib/copy/guessPath | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/copy/action b/lib/copy/action index 623d148..f87f130 100644 --- a/lib/copy/action +++ b/lib/copy/action @@ -22,11 +22,11 @@ copyFiles_action() { AND mime_type_actions.action = 2; SELECT "AtOM:NoMoreFiles";' >&3 - read -u4 line + read -u4 -d$'\0' line while ! [[ $line = AtOM:NoMoreFiles ]] do copyfiles+=("$line") - read -u4 line + read -u4 -d$'\0' line done echo 'BEGIN TRANSACTION;' >&3 diff --git a/lib/copy/guessPath b/lib/copy/guessPath index 75e1914..3b9705f 100644 --- a/lib/copy/guessPath +++ b/lib/copy/guessPath @@ -21,7 +21,7 @@ guessPath() { LIMIT 1 ),"0.0"); '>&3 - read -u4 timestamp + read -u4 -d$'\0' timestamp if (( ${timestamp/./} == 0 )) then return 2 @@ -46,7 +46,7 @@ guessPath() { LIMIT 1 ),"AtOM:NotFound"); '>&3 - read -u4 filename + read -u4 -d$'\0' filename if [[ $filename != AtOM:NotFound ]] then echo "${filename%/*}"