mirror of
https://github.com/SKCraft/Launcher.git
synced 2025-02-22 02:42:22 +01:00
NOISSUE Fix forge manifests with empty artifact URLs failing
This commit is contained in:
parent
2a6c5ee015
commit
460070e82f
@ -206,9 +206,10 @@ public class PackageBuilder {
|
|||||||
if (!outputPath.exists()) {
|
if (!outputPath.exists()) {
|
||||||
Files.createParentDirs(outputPath);
|
Files.createParentDirs(outputPath);
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
boolean urlEmpty = artifact.getUrl().isEmpty();
|
||||||
|
|
||||||
// If URL doesn't end with a /, it might be the direct file
|
// If URL doesn't end with a /, it might be the direct file
|
||||||
if (!artifact.getUrl().endsWith("/")) {
|
if (!urlEmpty && !artifact.getUrl().endsWith("/")) {
|
||||||
found = tryDownloadLibrary(library, artifact, artifact.getUrl(), outputPath);
|
found = tryDownloadLibrary(library, artifact, artifact.getUrl(), outputPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +222,7 @@ public class PackageBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assume artifact URL is a maven repository URL and try that
|
// Assume artifact URL is a maven repository URL and try that
|
||||||
if (!found) {
|
if (!found && !urlEmpty) {
|
||||||
URL url = LauncherUtils.concat(url(artifact.getUrl()), artifact.getPath());
|
URL url = LauncherUtils.concat(url(artifact.getUrl()), artifact.getPath());
|
||||||
found = tryDownloadLibrary(library, artifact, url.toString(), outputPath);
|
found = tryDownloadLibrary(library, artifact, url.toString(), outputPath);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user