summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/Dbx_sqlite/src/dbintf.cpp4
1 files changed, 3 insertions, 1 deletions
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) {