Skip to content

Commit

Permalink
Merge pull request #25 from MCUpdater/revert-24-patch-1
Browse files Browse the repository at this point in the history
Revert "Split library name on every colon, not only the first two"
  • Loading branch information
smbarbour authored Sep 3, 2022
2 parents d33dc2b + e8f6a79 commit 1e898a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mcupdater/mojang/Library.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public String getDownloadUrl() {
}

public String getLibraryPath(String classifier) {
String[] parts = this.name.split(":",0);
String[] parts = this.name.split(":",3);
return String.format("%s/%s/%s/%s-%s%s.jar", parts[0].replaceAll("\\.", "/"),parts[1],parts[2],parts[1],parts[2], (classifier == null ? "" : "-" + classifier)).replace("${arch}", System.getProperty("sun.arch.data.model"));
}

Expand All @@ -55,7 +55,7 @@ public boolean validForOS() {

public String getFilename() {
String result;
String[] parts = this.name.split(":",0);
String[] parts = this.name.split(":",3);
if (this.natives != null) {
if (this.natives.containsKey(OperatingSystem.getCurrentPlatform())) {
result = String.format("%s/%s/%s/%s-%s-%s.jar", parts[0].replaceAll("\\.", "/"),parts[1],parts[2],parts[1], parts[2], natives.get(OperatingSystem.getCurrentPlatform()));
Expand Down

0 comments on commit 1e898a3

Please sign in to comment.