@@ -29,10 +29,10 @@ import org.jackhuang.hmcl.util.Logging;
|
|||||||
import org.jackhuang.hmcl.util.StringUtils;
|
import org.jackhuang.hmcl.util.StringUtils;
|
||||||
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
||||||
import org.jackhuang.hmcl.util.io.FileUtils;
|
import org.jackhuang.hmcl.util.io.FileUtils;
|
||||||
import org.jackhuang.hmcl.util.io.NetworkUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -72,9 +72,9 @@ public class ServerModpackCompletionTask extends Task<Void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void preExecute() {
|
public void preExecute() throws Exception {
|
||||||
if (manifest == null || StringUtils.isBlank(manifest.getManifest().getFileApi())) return;
|
if (manifest == null || StringUtils.isBlank(manifest.getManifest().getFileApi())) return;
|
||||||
dependent = new GetTask(NetworkUtils.toURL(manifest.getManifest().getFileApi() + "/server-manifest.json"));
|
dependent = new GetTask(new URL(manifest.getManifest().getFileApi() + "/server-manifest.json"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -125,7 +125,7 @@ public class ServerModpackCompletionTask extends Task<Void> {
|
|||||||
|
|
||||||
if (download) {
|
if (download) {
|
||||||
dependencies.add(new FileDownloadTask(
|
dependencies.add(new FileDownloadTask(
|
||||||
NetworkUtils.toURL(remoteManifest.getFileApi() + "/overrides/" + file.getPath()),
|
new URL(remoteManifest.getFileApi() + "/overrides/" + file.getPath()),
|
||||||
actualPath.toFile(),
|
actualPath.toFile(),
|
||||||
new FileDownloadTask.IntegrityCheck("SHA-1", file.getHash())));
|
new FileDownloadTask.IntegrityCheck("SHA-1", file.getHash())));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user