From cc6110276ebe3eb1409f44fc67596581d28f33ef Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Feb 2021 21:53:01 +0300 Subject: fixes #2724 (Cannot import from sqlite to mdbx) --- plugins/Dbx_sqlite/src/dbintf.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/Dbx_sqlite/src/dbintf.cpp b/plugins/Dbx_sqlite/src/dbintf.cpp index f9ee454655..bb977059e7 100755 --- a/plugins/Dbx_sqlite/src/dbintf.cpp +++ b/plugins/Dbx_sqlite/src/dbintf.cpp @@ -106,9 +106,11 @@ MDatabaseCommon* CDbxSQLite::Load(const wchar_t *profile, int readonly) { sqlite3 *database = nullptr; ptrA path(mir_utf8encodeW(profile)); - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_EXCLUSIVE; + int flags = SQLITE_OPEN_EXCLUSIVE; if (readonly) flags |= SQLITE_OPEN_READONLY; + else + flags |= SQLITE_OPEN_READWRITE; int rc = sqlite3_open_v2(path, &database, flags, nullptr); if (rc != SQLITE_OK) { -- cgit v1.2.3