copy: use NULL in reads from db
This commit is contained in:
parent
b067454799
commit
c5815669e2
@ -22,11 +22,11 @@ copyFiles_action() {
|
|||||||
AND mime_type_actions.action = 2;
|
AND mime_type_actions.action = 2;
|
||||||
|
|
||||||
SELECT "AtOM:NoMoreFiles";' >&3
|
SELECT "AtOM:NoMoreFiles";' >&3
|
||||||
read -u4 line
|
read -u4 -d$'\0' line
|
||||||
while ! [[ $line = AtOM:NoMoreFiles ]]
|
while ! [[ $line = AtOM:NoMoreFiles ]]
|
||||||
do
|
do
|
||||||
copyfiles+=("$line")
|
copyfiles+=("$line")
|
||||||
read -u4 line
|
read -u4 -d$'\0' line
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 'BEGIN TRANSACTION;' >&3
|
echo 'BEGIN TRANSACTION;' >&3
|
||||||
|
|||||||
@ -21,7 +21,7 @@ guessPath() {
|
|||||||
LIMIT 1
|
LIMIT 1
|
||||||
),"0.0");
|
),"0.0");
|
||||||
'>&3
|
'>&3
|
||||||
read -u4 timestamp
|
read -u4 -d$'\0' timestamp
|
||||||
if (( ${timestamp/./} == 0 ))
|
if (( ${timestamp/./} == 0 ))
|
||||||
then
|
then
|
||||||
return 2
|
return 2
|
||||||
@ -46,7 +46,7 @@ guessPath() {
|
|||||||
LIMIT 1
|
LIMIT 1
|
||||||
),"AtOM:NotFound");
|
),"AtOM:NotFound");
|
||||||
'>&3
|
'>&3
|
||||||
read -u4 filename
|
read -u4 -d$'\0' filename
|
||||||
if [[ $filename != AtOM:NotFound ]]
|
if [[ $filename != AtOM:NotFound ]]
|
||||||
then
|
then
|
||||||
echo "${filename%/*}"
|
echo "${filename%/*}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user