diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index a8b774bb4d..eb4fa95429 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -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 diff --git a/stepmania/src/SongCacheIndex.cpp b/stepmania/src/SongCacheIndex.cpp index 876b893235..9608e506e0 100644 --- a/stepmania/src/SongCacheIndex.cpp +++ b/stepmania/src/SongCacheIndex.cpp @@ -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(); }