diff --git a/stepmania/src/SongCacheIndex.cpp b/stepmania/src/SongCacheIndex.cpp index 1c14355df2..978aa20d09 100644 --- a/stepmania/src/SongCacheIndex.cpp +++ b/stepmania/src/SongCacheIndex.cpp @@ -55,13 +55,21 @@ void SongCacheIndex::ReadCacheIndex() void SongCacheIndex::AddCacheIndex(const CString &path, unsigned hash) { CacheIndex.SetValueI( "Cache", "CacheVersion", FILE_CACHE_VERSION ); - CacheIndex.SetValueU( "Cache", path, hash ); + CacheIndex.SetValueU( "Cache", MangleName(path), hash ); CacheIndex.WriteFile(); } unsigned SongCacheIndex::GetCacheHash( const CString &path ) const { unsigned iDirHash; - CacheIndex.GetValueU( "Cache", path, iDirHash ); + CacheIndex.GetValueU( "Cache", MangleName(path), iDirHash ); return iDirHash; } + +CString SongCacheIndex::MangleName( const CString &Name ) +{ + /* We store paths in an INI. We can't store '='. */ + CString ret = Name; + ret.Replace( "=", ""); + return ret; +} diff --git a/stepmania/src/SongCacheIndex.h b/stepmania/src/SongCacheIndex.h index d05902002d..0fff50ae6e 100644 --- a/stepmania/src/SongCacheIndex.h +++ b/stepmania/src/SongCacheIndex.h @@ -5,6 +5,8 @@ class SongCacheIndex { IniFile CacheIndex; + static CString MangleName( const CString &Name ); + public: SongCacheIndex(); ~SongCacheIndex();