Update HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthCompletionTask.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Glavo 2025-07-31 16:50:18 +08:00 committed by GitHub
parent 5a08f6f11e
commit dcb3a87a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,7 @@ public class ModrinthCompletionTask extends Task<Void> {
if (manifest == null) if (manifest == null)
try { try {
Path manifestFile = repository.getVersionRoot(version).toPath().resolve("modrinth.index.json"); Path manifestFile = repository.getVersionRoot(version).toPath().resolve("modrinth.index.json");
if (Files.notExists(manifestFile)) if (Files.exists(manifestFile))
this.manifest = JsonUtils.fromJsonFile(manifestFile, ModrinthManifest.class); this.manifest = JsonUtils.fromJsonFile(manifestFile, ModrinthManifest.class);
} catch (Exception e) { } catch (Exception e) {
LOG.warning("Unable to read Modrinth modpack manifest.json", e); LOG.warning("Unable to read Modrinth modpack manifest.json", e);