getFiles, getDestDir, getDestFile: use SQL placeholder

This commit is contained in:
Vincent Riquer 2026-02-15 03:25:19 +01:00 committed by ScriptFanix
parent 4e8586276a
commit ca4542eb81
3 changed files with 5 additions and 3 deletions

View File

@ -103,4 +103,5 @@ getDestDir() {
mkdir -p "${destinationpath[$destination]}/$destdir" mkdir -p "${destinationpath[$destination]}/$destdir"
fi fi
destdir="${destdir//+(\/)//}" destdir="${destdir//+(\/)//}"
destdir=${destdir//$'\n'/::AtOM:NewLine:SQL:Inline::}
} }

View File

@ -55,6 +55,7 @@ getDestFile() {
destfile="${filename##*/}" destfile="${filename##*/}"
destfile="${destfile%.*}" destfile="${destfile%.*}"
fi fi
destfile=${destfile//$'\n'/::AtOM:NewLine:SQL:Inline::}
if (( ${destinationascii["$destination"]} )) if (( ${destinationascii["$destination"]} ))
then then
echo "$destfile" >&${toascii[1]} echo "$destfile" >&${toascii[1]}

View File

@ -17,7 +17,7 @@ getFiles() {
compare_time=$time compare_time=$time
fi fi
if ! Select source_files id >/dev/null <<-EOWhere if ! Select source_files id >/dev/null <<-EOWhere
filename = $filename filename = ${filename//$'\n'/::AtOM:NewLine:SQL:Inline::}
mime_type > 0 mime_type > 0
last_change LIKE $compare_time last_change LIKE $compare_time
size = $size size = $size
@ -47,7 +47,7 @@ getFiles() {
mime_type $mimetypeid \ mime_type $mimetypeid \
>/dev/null \ >/dev/null \
<<-EOWhere <<-EOWhere
filename $filename filename ${filename//$'\n'/::AtOM:NewLine:SQL:Inline::}
EOWhere EOWhere
(( ++new )) (( ++new ))
if (( new % 1000 == 0 )) if (( new % 1000 == 0 ))
@ -58,7 +58,7 @@ getFiles() {
fi fi
else else
Update source_files last_seen $scantime <<-EOWhere Update source_files last_seen $scantime <<-EOWhere
filename = $filename filename = ${filename//$'\n'/::AtOM:NewLine:SQL:Inline::}
EOWhere EOWhere
fi fi
progressSpin progressSpin