From 630f8f2f7c1c171155bf8e01bb821a0a80d5cded Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 7 Mar 2008 21:22:43 +0000 Subject: [PATCH] fix Song thinks it's cached even if writing the cache file fails --- stepmania/src/Song.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index ff5b2bcc6c..cb2af77ddd 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -208,7 +208,7 @@ bool Song::LoadFromSongDir( RString sDir ) // unsigned uCacheHash = SONGINDEX->GetCacheHash(m_sSongDir); bool bUseCache = true; - const RString sCacheFilePath = GetCacheFilePath(); + RString sCacheFilePath = GetCacheFilePath(); if( !DoesFileExist(sCacheFilePath) ) bUseCache = false; @@ -246,8 +246,10 @@ bool Song::LoadFromSongDir( RString sDir ) // Continue on with a blank Song so that people can make adjustments using the editor. } TidyUpData(); + // save a cache file so we don't have to parse it all over again next time - SaveToCacheFile(); + if( !SaveToCacheFile() ) + sCacheFilePath = RString(); }