Skip to content

Commit d7a6453

Browse files
committed
Version parser fix
1 parent 644faf3 commit d7a6453

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/mcphackers/mcp/tools/VersionsParser.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ private static JSONObject getJson() {
6969
JSONObject jsonSource = Util.parseJSONFile(jsonPath);
7070
if(jsonSource.has("source")) {
7171
String src = jsonSource.getString("source");
72-
if(!src.startsWith("http")) {
72+
if(!src.endsWith("/") && !src.endsWith("\\")) {
73+
src += "/";
74+
}
75+
if(!src.startsWith("https:") && !src.startsWith("http:") && !src.startsWith("file:")) {
7376
src = "file:" + src;
7477
}
7578
versionsURL = src;

0 commit comments

Comments
 (0)