From 1e2176029a94fd8c8e404e4d6b969abef08be40f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Jan 2020 14:10:49 +0300 Subject: fixes #2181 ("Miranda was unable to open , it's in an unknown format") --- plugins/Dbx_mdbx/src/dbintf.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins/Dbx_mdbx/src/dbintf.cpp') 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); -- cgit v1.2.3