summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbcrypt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-30 16:47:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-30 16:47:09 +0300
commit0a8a140351a533e2fb895228589efd2846b9c697 (patch)
treeea9b92130b2f6ab7304e496f20f8b88e0d7ca78f /plugins/Dbx_mdbx/src/dbcrypt.cpp
parent3166b70501ec138496e04140f82147ea23d82420 (diff)
fix for asynchronous database flush to fix unsaved data
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcrypt.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbcrypt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp
index 0a6585e565..e22b3a293d 100644
--- a/plugins/Dbx_mdbx/src/dbcrypt.cpp
+++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp
@@ -62,6 +62,7 @@ CRYPTO_PROVIDER* CDbxMDBX::SelectProvider()
return nullptr;
}
+ DBFlush();
return pProv;
}
@@ -137,6 +138,7 @@ void CDbxMDBX::StoreKey()
}
SecureZeroMemory(pKey, iKeyLength);
+ DBFlush();
}
void CDbxMDBX::SetPassword(const wchar_t *ptszPassword)
@@ -228,6 +230,7 @@ int CDbxMDBX::EnableEncryption(bool bEncrypted)
if (trnlck.commit() != MDBX_SUCCESS)
return 1;
+ DBFlush();
m_bEncrypted = bEncrypted;
return 0;
}