diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-13 14:10:49 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-13 14:10:49 +0300 |
commit | 1e2176029a94fd8c8e404e4d6b969abef08be40f (patch) | |
tree | d35f9d19d2b87c090b023928a58eaab20ac61205 /plugins/Dbx_mdbx/src/dbintf.cpp | |
parent | 516cbe82f0191a9ff3b2c43e4b2330fb48fa07e3 (diff) |
fixes #2181 ("Miranda was unable to open <profile_name>, it's in an unknown format")
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index db87bcca74..07307cd22a 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -60,6 +60,15 @@ int CDbxMDBX::Load() unsigned int defFlags = MDBX_CREATE;
{
txn_ptr trnlck(StartTran());
+ if (trnlck == nullptr) {
+ if (m_dbError == MDBX_TXN_FULL) {
+ if (IDOK == MessageBox(NULL, TranslateT("Your database is in the obsolete format. Click Ok to read the upgrade instructions or Cancel to exit"), TranslateT("Error"), MB_ICONERROR | MB_OKCANCEL))
+ Utils_OpenUrl("https://www.miranda-ng.org/news/unknown_profile_format");
+ return EGROKPRF_OBSOLETE;
+ }
+ return EGROKPRF_DAMAGED;
+ }
+
mdbx_dbi_open(trnlck, "global", defFlags | MDBX_INTEGERKEY, &m_dbGlobal);
mdbx_dbi_open(trnlck, "crypto", defFlags, &m_dbCrypto);
mdbx_dbi_open(trnlck, "contacts", defFlags | MDBX_INTEGERKEY, &m_dbContacts);
|