* [ProfileManager] Fix an issue when deleting recently created profiles. Fixes issue 119
This commit is contained in:
@@ -8,6 +8,10 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 Preview 3 | 20110???
|
StepMania 5.0 Preview 3 | 20110???
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2011/07/30
|
||||||
|
----------
|
||||||
|
* [ProfileManager] Fix an issue when deleting recently created profiles. [AJ]
|
||||||
|
|
||||||
2011/07/26
|
2011/07/26
|
||||||
----------
|
----------
|
||||||
* [ScreenEdit] Add a semi working implementation of the often requested
|
* [ScreenEdit] Add a semi working implementation of the often requested
|
||||||
|
|||||||
@@ -482,10 +482,14 @@ bool ProfileManager::RenameLocalProfile( RString sProfileID, RString sNewName )
|
|||||||
|
|
||||||
bool ProfileManager::DeleteLocalProfile( RString sProfileID )
|
bool ProfileManager::DeleteLocalProfile( RString sProfileID )
|
||||||
{
|
{
|
||||||
|
LOG->Trace( ssprintf("[ProfileManager::DeleteLocalProfile] delete %s",sProfileID.c_str()) );
|
||||||
Profile *pProfile = ProfileManager::GetLocalProfile( sProfileID );
|
Profile *pProfile = ProfileManager::GetLocalProfile( sProfileID );
|
||||||
ASSERT( pProfile );
|
ASSERT( pProfile );
|
||||||
RString sProfileDir = LocalProfileIDToDir( sProfileID );
|
RString sProfileDir = LocalProfileIDToDir( sProfileID );
|
||||||
|
|
||||||
|
// flush directory cache in an attempt to get this working
|
||||||
|
FILEMAN->FlushDirCache( sProfileDir );
|
||||||
|
|
||||||
FOREACH( DirAndProfile, g_vLocalProfile, i )
|
FOREACH( DirAndProfile, g_vLocalProfile, i )
|
||||||
{
|
{
|
||||||
if( i->sDir == sProfileDir )
|
if( i->sDir == sProfileDir )
|
||||||
@@ -504,6 +508,7 @@ bool ProfileManager::DeleteLocalProfile( RString sProfileID )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LOG->Trace( ssprintf("[ProfileManager::DeleteLocalProfile] DeleteRecursive(%s) failed",sProfileID.c_str()) );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user