From d0e07de278884b2ea973268f5fce8a441975aed2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 5 Sep 2018 14:56:25 +0300 Subject: network log is not available on this stage, we have to use MessageBox instead (related to #1326) --- plugins/Db3x_mmap/src/init.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index 473c997b2c..cb63b606a7 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -93,13 +93,15 @@ static MDatabaseCommon* LoadDatabase(const wchar_t *profile, BOOL bReadOnly) CMStringW wszBackupName(profile); wszBackupName.Append(L".bak"); if (!MoveFileW(profile, wszBackupName)) { - Netlib_LogfW(nullptr, L"Cannot move old profile '%s' to '%s': error %d", profile, wszBackupName.c_str(), GetLastError()); + DWORD dwError = GetLastError(); + CMStringW wszError(FORMAT, TranslateT("Cannot move old profile '%s' to '%s': error %d"), profile, wszBackupName.c_str(), dwError); + MessageBoxW(nullptr, wszError, L"Miranda NG", MB_ICONERROR | MB_OK); return nullptr; } if ((errorCode = pLink->makeDatabase(profile)) != 0) { - Netlib_LogfW(nullptr, L"Database creation '%s' failed with error code %d", profile, errorCode); -LBL_Error: + MessageBoxW(nullptr, CMStringW(FORMAT, TranslateT("Attempt to create database '%s' failed with error code %d"), profile, errorCode), L"Miranda NG", MB_ICONERROR | MB_OK); +LBL_Error: DeleteFileW(profile); MoveFileW(wszBackupName, profile); return nullptr; -- cgit v1.2.3