diff options
author | George Hazan <ghazan@miranda.im> | 2018-08-29 19:28:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-08-29 19:28:47 +0300 |
commit | 634ded759c8208a62ea1ce4dd9bb5fa708ff0c33 (patch) | |
tree | 3b43e4205996717669737182455a423aeeb27b79 /plugins/Import/src | |
parent | 7bf8d7b243bb4d667b07c20858a15880b0625cce (diff) |
fixes #1555 (Import shouldn't import .bak second time in service mode)
Diffstat (limited to 'plugins/Import/src')
-rw-r--r-- | plugins/Import/src/main.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 0cf5f42e70..108ce1cee8 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -91,17 +91,19 @@ static int OnExit(WPARAM, LPARAM) return 0;
}
-static INT_PTR ServiceMode(WPARAM, LPARAM)
+static INT_PTR ServiceMode(WPARAM wParam, LPARAM)
{
g_bServiceMode = true;
- ptrW wszFullName(Utils_ReplaceVarsW(L"%miranda_userdata%\\%miranda_profilename%.dat.bak"));
- if (!_waccess(wszFullName, 0)) {
- g_iImportOptions = IOPT_ADDUNKNOWN + IOPT_COMPLETE + IOPT_CHECKDUPS;
- wcsncpy_s(importFile, MAX_PATH, wszFullName, _TRUNCATE);
+ if (wParam == 1) {
+ ptrW wszFullName(Utils_ReplaceVarsW(L"%miranda_userdata%\\%miranda_profilename%.dat.bak"));
+ if (!_waccess(wszFullName, 0)) {
+ g_iImportOptions = IOPT_ADDUNKNOWN + IOPT_COMPLETE + IOPT_CHECKDUPS;
+ wcsncpy_s(importFile, MAX_PATH, wszFullName, _TRUNCATE);
- WizardDlgParam param = { IDD_PROGRESS, (LPARAM)ProgressPageProc };
- DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_WIZARD), nullptr, WizardDlgProc, LPARAM(¶m));
+ WizardDlgParam param = { IDD_PROGRESS, (LPARAM)ProgressPageProc };
+ DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_WIZARD), nullptr, WizardDlgProc, LPARAM(¶m));
+ }
return SERVICE_CONTINUE;
}
|