summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/database.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp
index ce47bd9981..f0dbfa8077 100644
--- a/src/mir_app/src/database.cpp
+++ b/src/mir_app/src/database.cpp
@@ -505,19 +505,22 @@ int LoadDatabaseModule(void)
}
else if (rc > 0) {
// if there were drivers but they all failed cos the file is locked, try and find the miranda which locked it
+ if (FindMirandaForProfile(szProfile))
+ break;
+
if (fileExist(szProfile)) {
// file isn't locked, just no driver could open it.
MessageBox(nullptr,
CMStringW(FORMAT, TranslateW(tszUnknownFormat), ptszFileName),
TranslateT("Miranda can't understand that profile"), MB_OK | MB_ICONERROR);
}
- else if (!FindMirandaForProfile(szProfile)) {
+ else
retry = IDRETRY == MessageBox(nullptr,
CMStringW(FORMAT, TranslateW(tszProfileLocked), ptszFileName),
TranslateT("Miranda can't open that profile"), MB_RETRYCANCEL | MB_ICONERROR);
- }
}
- } while (retry);
+ }
+ while (retry);
if (rc == ERROR_SUCCESS) {
InitIni();