From a29237f73b954461088a5cd59f9593b9d874ce34 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Aug 2012 18:27:35 +0000 Subject: fix for the Profile Manager plugin. it returned to the plugin's list git-svn-id: http://svn.miranda-ng.org/main/trunk@1446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/database.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index e25747b9fb..ae5e497a8d 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -293,6 +293,7 @@ static int getProfileAutoRun(TCHAR *szProfile) // returns 1 if a profile was selected static int getProfile(TCHAR *szProfile, size_t cch) { + PROFILEMANAGERDATA pd = {0}; getProfilePath(g_profileDir, SIZEOF(g_profileDir)); if (IsInsideRootDir(g_profileDir, true)) if (WritePrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), mirandabootini)) @@ -308,16 +309,21 @@ static int getProfile(TCHAR *szProfile, size_t cch) _T("Miranda NG"), MB_ICONERROR | MB_OK); return 0; } + + if ( CmdLine_GetOption( _T("ForceShowPM"))) { +LBL_Show: + pd.szProfile = szProfile; + pd.szProfileDir = g_profileDir; + return getProfileManager(&pd); + } + if (getProfileAutoRun(szProfile)) return 1; - PROFILEMANAGERDATA pd = {0}; if (getProfile1(szProfile, cch, g_profileDir, &pd.noProfiles)) return 1; - pd.szProfile = szProfile; - pd.szProfileDir = g_profileDir; - return getProfileManager(&pd); + goto LBL_Show; } // carefully converts a file name from TCHAR* to char* -- cgit v1.2.3