mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-11 04:46:18 -04:00
Fix always throwing IOException when downloading game asset index
This commit is contained in:
parent
1516802a8d
commit
228fddf902
@ -62,7 +62,7 @@ public final class GameAssetIndexDownloadTask extends Task {
|
|||||||
public void execute() throws Exception {
|
public void execute() throws Exception {
|
||||||
AssetIndexInfo assetIndexInfo = version.getAssetIndex();
|
AssetIndexInfo assetIndexInfo = version.getAssetIndex();
|
||||||
File assetDir = dependencyManager.getGameRepository().getAssetDirectory(version.getId(), assetIndexInfo.getId());
|
File assetDir = dependencyManager.getGameRepository().getAssetDirectory(version.getId(), assetIndexInfo.getId());
|
||||||
if (FileUtils.makeDirectory(assetDir))
|
if (!FileUtils.makeDirectory(assetDir))
|
||||||
throw new IOException("Cannot create directory: " + assetDir);
|
throw new IOException("Cannot create directory: " + assetDir);
|
||||||
File assetIndexFile = dependencyManager.getGameRepository().getIndexFile(version.getId(), assetIndexInfo.getId());
|
File assetIndexFile = dependencyManager.getGameRepository().getIndexFile(version.getId(), assetIndexInfo.getId());
|
||||||
dependencies.add(new FileDownloadTask(
|
dependencies.add(new FileDownloadTask(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user