summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Import/src/miranda.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index d2fef1228c..56b28849b2 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -135,6 +135,11 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR
ofn.nMaxFile = _countof(str);
ofn.lpstrInitialDir = pfd;
if (GetOpenFileName(&ofn)) {
+ if (!mir_wstrcmpi(str, VARSW(L"%miranda_userdata%\\%miranda_profilename%.dat"))) {
+ MessageBoxW(nullptr, TranslateT("You cannot import your current profile into itself"), L"Miranda NG", MB_OK | MB_ICONERROR);
+ break;
+ }
+
SetDlgItemText(hwndDlg, IDC_FILENAME, str);
SendDlgItemMessage(hwndDlg, IDC_LIST, LB_SETCURSEL, -1, 0);
SendMessage(GetParent(hwndDlg), WIZM_ENABLEBUTTON, 1, 0);