diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-05 14:56:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-05 14:56:25 +0300 |
commit | d0e07de278884b2ea973268f5fce8a441975aed2 (patch) | |
tree | 18e8feefbf619f7c294bcce22783a95a2c01eb79 | |
parent | c363b436996e3dcef1d69e8e261534914bd04b65 (diff) |
network log is not available on this stage, we have to use MessageBox instead (related to #1326)
-rw-r--r-- | plugins/Db3x_mmap/src/init.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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;
|