Skip to content

Commit

Permalink
fix: transform id to url (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh authored Jun 3, 2022
1 parent f716a26 commit 28876c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/itxtech/mcl/component/Repository.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public MclPackageIndex fetchPackageIndex() throws Exception {
}

private static String transformId(String id) {
return id.replace(".", "/").replace(":", "/");
var arr = id.split(":", 2);
var group = arr[0];
var name = arr[1];
return group.replace(".", "/") + "/" + name;
}

private static String getPackageFromId(String id) {
Expand Down

0 comments on commit 28876c2

Please sign in to comment.