Fix always throwing IOException when downloading game asset index

This commit is contained in:
huangyuhui 2018-02-04 21:26:55 +08:00
parent 1516802a8d
commit 228fddf902

View File

@ -62,7 +62,7 @@ public final class GameAssetIndexDownloadTask extends Task {
public void execute() throws Exception {
AssetIndexInfo assetIndexInfo = version.getAssetIndex();
File assetDir = dependencyManager.getGameRepository().getAssetDirectory(version.getId(), assetIndexInfo.getId());
if (FileUtils.makeDirectory(assetDir))
if (!FileUtils.makeDirectory(assetDir))
throw new IOException("Cannot create directory: " + assetDir);
File assetIndexFile = dependencyManager.getGameRepository().getIndexFile(version.getId(), assetIndexInfo.getId());
dependencies.add(new FileDownloadTask(