copy: use NULL in reads from db

This commit is contained in:
Vincent Riquer 2025-11-10 15:33:55 +01:00
parent b067454799
commit c5815669e2
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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%/*}"