use standard functions

This commit is contained in:
Glenn Maynard
2003-02-14 06:59:56 +00:00
parent 3f870fd44a
commit 6eb201b70b
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -704,7 +704,7 @@ void Song::Save()
{ {
CString sOldPath = m_sSongDir + arrayOldFileNames[i]; CString sOldPath = m_sSongDir + arrayOldFileNames[i];
CString sNewPath = sOldPath + ".old"; CString sNewPath = sOldPath + ".old";
MoveFile( sOldPath, sNewPath ); rename( sOldPath, sNewPath );
} }
ReCalculateRadarValuesAndLastBeat(); ReCalculateRadarValuesAndLastBeat();
+4 -1
View File
@@ -1,5 +1,8 @@
#include "stdafx.h" #include "stdafx.h"
#include <sys/stat.h>
#include <sys/types.h>
#include "SongCacheIndex.h" #include "SongCacheIndex.h"
#include "RageLog.h" #include "RageLog.h"
#include "RageUtil.h" #include "RageUtil.h"
@@ -32,7 +35,7 @@ void SongCacheIndex::ReadCacheIndex()
CStringArray asCacheFileNames; CStringArray asCacheFileNames;
GetDirListing( "Cache/*", asCacheFileNames ); GetDirListing( "Cache/*", asCacheFileNames );
for( unsigned i=0; i<asCacheFileNames.size(); i++ ) for( unsigned i=0; i<asCacheFileNames.size(); i++ )
DeleteFile( "Cache/" + asCacheFileNames[i] ); remove( "Cache/" + asCacheFileNames[i] );
CacheIndex.Reset(); CacheIndex.Reset();
} }