From b4d4b9805b8ee8d97a35ee961fc36184c796deed Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 31 May 2013 23:17:56 -0400 Subject: [PATCH] Bloody cache. --- src/Song.cpp | 2 +- src/SongCacheIndex.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Song.cpp b/src/Song.cpp index 9cec6f9f62..46dd40c2a9 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -42,7 +42,7 @@ * @brief The internal version of the cache for StepMania. * * Increment this value to invalidate the current cache. */ -const int FILE_CACHE_VERSION = 213; +const int FILE_CACHE_VERSION = 215; /** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; diff --git a/src/SongCacheIndex.cpp b/src/SongCacheIndex.cpp index fb0d588adc..c6c4740f70 100644 --- a/src/SongCacheIndex.cpp +++ b/src/SongCacheIndex.cpp @@ -98,6 +98,12 @@ void SongCacheIndex::ReadCacheIndex() EmptyDir( SpecialFiles::CACHE_DIR+"Courses/" ); CacheIndex.Clear(); + /* This is right now in place because our song file paths are apparently being + * cached in two distinct areas, and songs were loading from paths in FILEMAN. + * This is admittedly a hack for now, but this does bring up a good question on + * whether we really need a dedicated cache for future versions of StepMania. + */ + FILEMAN->FlushDirCache(); } void SongCacheIndex::AddCacheIndex(const RString &path, unsigned hash)