fix "FILEMAN->CreateDirectory leaves temp file hanging around"
This commit is contained in:
@@ -281,7 +281,7 @@ bool RageFileManager::Remove( CString sPath )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool ret = g_Drivers[i].driver->Remove( p );
|
bool ret = g_Drivers[i].driver->Remove( p );
|
||||||
if( !ret )
|
if( ret )
|
||||||
Deleted = true;
|
Deleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,9 +295,13 @@ void RageFileManager::CreateDir( CString sDir )
|
|||||||
f.Open( sTempFile, RageFile::WRITE );
|
f.Open( sTempFile, RageFile::WRITE );
|
||||||
f.Close();
|
f.Close();
|
||||||
|
|
||||||
FILEMAN->Remove( sTempFile );
|
// YUCK: The dir cache doesn't have this new file we just created,
|
||||||
|
// so the delete will fail unless we flush.
|
||||||
|
FILEMAN->FlushDirCache( sDir );
|
||||||
|
|
||||||
|
FILEMAN->Remove( sTempFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
||||||
{
|
{
|
||||||
LockMut( *g_Mutex );
|
LockMut( *g_Mutex );
|
||||||
|
|||||||
@@ -1309,8 +1309,8 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam
|
|||||||
BOOKKEEPER->WriteToDisk();
|
BOOKKEEPER->WriteToDisk();
|
||||||
PROFILEMAN->SaveMachineProfile();
|
PROFILEMAN->SaveMachineProfile();
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
if( PROFILEMAN->IsUsingProfile((PlayerNumber)p) )
|
if( PROFILEMAN->IsUsingProfile(p) )
|
||||||
PROFILEMAN->SaveProfile( (PlayerNumber)p );
|
PROFILEMAN->SaveProfile( p );
|
||||||
SCREENMAN->SystemMessage( "Stats saved" );
|
SCREENMAN->SystemMessage( "Stats saved" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user