summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbintf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintf.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbintf.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp
index d481fd1afa..7b50e80263 100644
--- a/plugins/Db3x_mmap/src/dbintf.cpp
+++ b/plugins/Db3x_mmap/src/dbintf.cpp
@@ -108,6 +108,9 @@ CDb3Mmap::~CDb3Mmap()
free(m_pNull);
}
+static TCHAR szMsgConvert[] =
+ LPGENT("Your database must be converted into the new format. This is potentially dangerous operation, so please make a backup before.\n\nClick Yes to proceed with conversion or No to exit Miranda");
+
int CDb3Mmap::Load(bool bSkipInit)
{
log0("DB logging running");
@@ -135,18 +138,14 @@ int CDb3Mmap::Load(bool bSkipInit)
// everything is ok, go on
if (!m_bReadOnly) {
- bool bConversion = false;
- if (m_dbHeader.version < DB_095_VERSION) {
- ConvertContacts();
- bConversion = true;
- }
-
if (m_dbHeader.version < DB_095_1_VERSION) {
+ if (IDYES != MessageBox(NULL, TranslateTS(szMsgConvert), TranslateT("Database conversion warning"), MB_YESNOCANCEL | MB_ICONQUESTION))
+ return EGROKPRF_CANTREAD;
+
+ if (m_dbHeader.version < DB_095_VERSION)
+ ConvertContacts();
ConvertEvents();
- bConversion = true;
- }
- if (bConversion) {
m_dbHeader.version = DB_095_1_VERSION;
DBWrite(sizeof(dbSignatureU), &m_dbHeader.version, sizeof(m_dbHeader.version));
}