move song cache into a subdir
This commit is contained in:
@@ -277,7 +277,7 @@ float Song::GetElapsedTimeFromBeat( float fBeat ) const
|
||||
|
||||
CString Song::GetCacheFilePath() const
|
||||
{
|
||||
return ssprintf( "Cache/%u", GetHashForString(m_sSongDir) );
|
||||
return ssprintf( "Cache/Songs/%u", GetHashForString(m_sSongDir) );
|
||||
}
|
||||
|
||||
/* Get a path to the SM containing data for this song. It might
|
||||
|
||||
@@ -12,7 +12,7 @@ SongCacheIndex *SONGINDEX;
|
||||
|
||||
SongCacheIndex::SongCacheIndex()
|
||||
{
|
||||
mkdir("Cache", 0755);
|
||||
CreateDirectories( "Cache/Songs" );
|
||||
CacheIndex.SetPath( "Cache/index.cache" );
|
||||
ReadCacheIndex();
|
||||
}
|
||||
@@ -50,6 +50,7 @@ void SongCacheIndex::ReadCacheIndex()
|
||||
LOG->Trace( "Cache format is out of date. Deleting all cache files." );
|
||||
EmptyDir( "Cache/" );
|
||||
EmptyDir( "Cache/Banners/" );
|
||||
EmptyDir( "Cache/Songs/" );
|
||||
|
||||
CacheIndex.Reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user