diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/database/database.cpp | 13 | ||||
-rw-r--r-- | src/modules/database/profilemanager.cpp | 2 |
2 files changed, 6 insertions, 9 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, '\\');
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index b15f1a74e4..24fcf8650e 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -293,14 +293,12 @@ BOOL EnumProfilesForList(TCHAR *tszFullPath, TCHAR *profile, LPARAM lParam) } DATABASELINK *dblink; - bool bNeedConversion = false; switch (touchDatabase(tszFullPath, &dblink)) { case ERROR_SUCCESS: item.iImage = bFileLocked; break; case EGROKPRF_OBSOLETE: - bNeedConversion = true; item.iImage = 2; break; |