From 21fe9b80ff4030f76f68a90726bc29e49627414c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Apr 2018 20:55:08 +0300 Subject: check if this profile is already opened in another Miranda nevertheless if there's only one available profile or many --- src/mir_app/src/database.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp index f0dbfa8077..2dc134e6da 100644 --- a/src/mir_app/src/database.cpp +++ b/src/mir_app/src/database.cpp @@ -487,6 +487,10 @@ int LoadDatabaseModule(void) return 1; } + // if this profile is already opened in another miranda, silently return + if (FindMirandaForProfile(szProfile)) + return 1; + // find a driver to support the given profile bool retry; int rc; @@ -504,10 +508,6 @@ int LoadDatabaseModule(void) TranslateT("Miranda can't open that profile"), MB_OK | MB_ICONERROR); } 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, -- cgit v1.2.3