mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 12:26:16 -04:00
Fix #1201: Download version jar if the jar is empty
This commit is contained in:
parent
ccb8981634
commit
76c361e9bc
@ -27,6 +27,7 @@ import org.jackhuang.hmcl.game.Library;
|
|||||||
import org.jackhuang.hmcl.game.Version;
|
import org.jackhuang.hmcl.game.Version;
|
||||||
import org.jackhuang.hmcl.task.Task;
|
import org.jackhuang.hmcl.task.Task;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -78,7 +79,8 @@ public class DefaultDependencyManager extends AbstractDependencyManager {
|
|||||||
Version version = original.resolve(repository);
|
Version version = original.resolve(repository);
|
||||||
return Task.allOf(
|
return Task.allOf(
|
||||||
Task.composeAsync(() -> {
|
Task.composeAsync(() -> {
|
||||||
if (!repository.getVersionJar(version).exists())
|
File versionJar = repository.getVersionJar(version);
|
||||||
|
if (!versionJar.exists() || versionJar.length() == 0)
|
||||||
return new GameDownloadTask(this, null, version);
|
return new GameDownloadTask(this, null, version);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user