getDestDir: replace \n with SQL placeholder before passing through toascii

This commit is contained in:
Vincent Riquer 2026-02-15 03:56:01 +01:00
parent 76bad8af0b
commit 198b6e0eee

View File

@ -88,6 +88,7 @@ getDestDir() {
while [[ $part =~ / ]] while [[ $part =~ / ]]
do do
thispart="${part%%/*}" thispart="${part%%/*}"
thispart=${thispart//$'\n'/::AtOM:NewLine:SQL:Inline::}
if (( ${destinationascii["$destination"]} )) if (( ${destinationascii["$destination"]} ))
then then
echo "$thispart" >&${toascii[1]} echo "$thispart" >&${toascii[1]}
@ -100,8 +101,7 @@ getDestDir() {
fi fi
if ! [ -d "${destinationpath[$destination]}/$destdir" ] if ! [ -d "${destinationpath[$destination]}/$destdir" ]
then then
mkdir -p "${destinationpath[$destination]}/$destdir" mkdir -p "${destinationpath[$destination]}/${destdir//::AtOM:NewLine:SQL:Inline::/$'\n'}"
fi fi
destdir="${destdir//+(\/)//}" destdir="${destdir//+(\/)//}"
destdir=${destdir//$'\n'/::AtOM:NewLine:SQL:Inline::}
} }