From 77821c179a8c686d47b8054164a3099f9b7ce0a0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 13 Jul 2008 22:23:24 +0000 Subject: [PATCH] only write cache index on success --- stepmania/src/CourseLoaderCRS.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/CourseLoaderCRS.cpp b/stepmania/src/CourseLoaderCRS.cpp index 5eb32e975d..5b56a45213 100644 --- a/stepmania/src/CourseLoaderCRS.cpp +++ b/stepmania/src/CourseLoaderCRS.cpp @@ -388,9 +388,8 @@ bool CourseLoaderCRS::LoadFromCRSFile( const RString &_sPath, Course &out ) if( out.m_RadarCache.size() ) { RString sCachePath = out.GetCacheFilePath(); - CourseWriterCRS::Write( out, sCachePath, true ); - - SONGINDEX->AddCacheIndex( out.m_sPath, GetHashForFile(out.m_sPath) ); + if( CourseWriterCRS::Write(out, sCachePath, true) ) + SONGINDEX->AddCacheIndex( out.m_sPath, GetHashForFile(out.m_sPath) ); } }