diff options
Diffstat (limited to 'src/modules/database/database.cpp')
-rw-r--r-- | src/modules/database/database.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index 73794631d3..f782a5357d 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -258,13 +258,10 @@ static int getProfile1(TCHAR *szProfile, size_t cch, TCHAR *profiledir, BOOL * n switch (touchDatabase(newProfile, NULL)) {
case 0:
+ case EGROKPRF_OBSOLETE:
if (++found == 1 && bNoDefaultProfile)
_tcsncpy_s(szProfile, cch, newProfile, _TRUNCATE);
break;
-
- case EGROKPRF_OBSOLETE:
- found += 2; // force showing PM even if only one obsolete profile found
- break;
}
}
while (FindNextFile(hFind, &ffd));
@@ -400,9 +397,13 @@ int tryOpenDatabase(const TCHAR *tszProfile) continue;
case EGROKPRF_OBSOLETE:
+ EnsureCheckerLoaded(true);
+ CallService(MS_DB_CHECKPROFILE, (WPARAM)tszProfile, 2);
break;
+
+ default:
+ return err;
}
- return err;
}
bWasOpened = true;
@@ -490,8 +491,6 @@ int LoadDatabaseModule(void) if (!getProfile(szProfile, SIZEOF(szProfile)))
return 1;
- EnsureCheckerLoaded(false); // unload dbchecker
-
if (arDbPlugins.getCount() == 0) {
TCHAR buf[256];
TCHAR *p = _tcsrchr(szProfile, '\\');
|