only write cache index on success
This commit is contained in:
@@ -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) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user