return ID of the created profile

This commit is contained in:
Chris Danford
2005-07-16 05:28:34 +00:00
parent f7ebcc7c34
commit 0bc9261eb3
3 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -322,7 +322,7 @@ Profile &ProfileManager::GetLocalProfile( const CString &sProfileID )
return *iter->second;
}
bool ProfileManager::CreateLocalProfile( CString sName )
bool ProfileManager::CreateLocalProfile( CString sName, CString &sProfileIDOut )
{
ASSERT( !sName.empty() );
@@ -343,6 +343,10 @@ bool ProfileManager::CreateLocalProfile( CString sName )
return false;
bool bResult = Profile::CreateNewProfile( sProfileDir, sName );
if( bResult )
sProfileIDOut = sProfileID;
else
sProfileIDOut = "";
RefreshLocalProfilesFromDisk();
return bResult;
}