summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-26 00:01:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-26 00:01:31 +0300
commitb2c47fe47b18d21b90d9c536e70bf45ef9d33e3c (patch)
tree99abc6383f38e168f768daabbe49ac2c17c7d1a7 /src
parent6e0d30721924f58ecbcd73d9bc53a8940ba0133a (diff)
fixes #1208 (if profile is opened in r/w mode, it should be locked)
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();