GH-853 evict asset index files from cache when they don't parse

This commit is contained in:
Petr Mrázek
2015-04-01 00:23:17 +02:00
parent eae544f0eb
commit 3b6574181e
3 changed files with 22 additions and 0 deletions

View File

@@ -118,6 +118,9 @@ void OneSixUpdate::assetIndexFinished()
QString asset_fname = "assets/indexes/" + assetName + ".json";
if (!AssetsUtils::loadAssetsIndexJson(asset_fname, &index))
{
auto metacache = MMC->metacache();
auto entry = metacache->resolveEntry("asset_indexes", assetName + ".json");
metacache->evictEntry(entry);
emitFailed(tr("Failed to read the assets index!"));
}