diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-31 21:35:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-31 21:35:07 +0000 |
commit | 02e2ae2b77585b4f2726d9528ceea9ce4d99b453 (patch) | |
tree | 0b79b5c76b85d285081deb93688cf9b6d602e553 /src | |
parent | 5129d51c859daf669ef01099a563621f85037405 (diff) |
ability to run converter from old profile versions without launching Profile Manager, if the old profile is the only profile present
git-svn-id: http://svn.miranda-ng.org/main/trunk@11703 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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; |