summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-01 19:19:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-01 19:19:52 +0300
commit3ebde0b1c89e06cfd640bf7343859ce8f8e53d9e (patch)
tree011fb1046e523849666416279d3a91d54439e0a3 /plugins/Dbx_sqlite/src
parentafb3d3d1a76f5728755753abcf02e402c0f24569 (diff)
fixes #2735 ([dbx_sqlite][db_autobackups] db backups are intermittently created as 0-byte files)
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rwxr-xr-xplugins/Dbx_sqlite/src/dbintf.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Dbx_sqlite/src/dbintf.cpp b/plugins/Dbx_sqlite/src/dbintf.cpp
index 76e83c277f..c95af86ae8 100755
--- a/plugins/Dbx_sqlite/src/dbintf.cpp
+++ b/plugins/Dbx_sqlite/src/dbintf.cpp
@@ -167,9 +167,15 @@ BOOL CDbxSQLite::Backup(LPCWSTR profile)
return ERROR_BACKUP_CONTROLLER;
}
+ rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr);
+ logError(rc, __FILE__, __LINE__);
+
logError(sqlite3_backup_step(backup, -1), __FILE__, __LINE__);
logError(sqlite3_backup_finish(backup), __FILE__, __LINE__);
sqlite3_close(database);
+
+ rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr);
+ logError(rc, __FILE__, __LINE__);
return 0;
}