From a2a576f14b0d9f4f4b298d99acac1ba61ed1a335 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 10 Nov 2025 01:57:46 +0100 Subject: [PATCH] open database with -newline set to NULL --- lib/database/open | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/database/open b/lib/database/open index c11da4f..078153f 100644 --- a/lib/database/open +++ b/lib/database/open @@ -3,7 +3,8 @@ openDatabase() { [[ -f "$database" ]] || populate_db=1 rm -f "$tempdir"/sqlite.{in,out} mkfifo "$tempdir"/sqlite.{in,out} - sqlite3 -bail "$database" \ + sqlite3 -bail -newline $'\0' \ + "$database" \ < "$tempdir/sqlite.in" \ > "$tempdir/sqlite.out" & exec 3> "$tempdir"/sqlite.in @@ -20,7 +21,7 @@ openDatabase() { echo 'PRAGMA recursive_triggers = ON;' >&3 echo 'PRAGMA temp_store = 2;' >&3 echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3 - read -u4 + read -u4 -d $'\0' unset REPLY checkDatabaseVersion }