Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 8c8e08e

Browse files
committed
Update check.js
1 parent b75c455 commit 8c8e08e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

oneclient/check.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ function checkMod(file) {
3030
if (parsed.update?.modrinth?.version) {
3131
const modVersion = parsed.update.modrinth.version;
3232
const split = parsed.download.url.split("/");
33-
if (split[split.length - 2] !== modVersion) {
33+
const urlVersion = decodeURIComponent(split[split.length - 2]);
34+
const urlFilename = decodeURIComponent(split[split.length - 1]);
35+
// Modrinth CDN urls normally embed the version id, but some older versions
36+
// embed the version number instead. Accept either, as long as the url still
37+
// points at the declared jar.
38+
if (urlVersion !== modVersion && urlFilename !== parsed.filename) {
3439
errors.push(`${file} has a bad download modrinth url. Please fix`);
3540
return parsed.id;
3641
}

0 commit comments

Comments
 (0)