使用支持 Java 8 的 API

This commit is contained in:
Zkitefly 2025-06-20 22:07:52 +08:00
parent 3544cdb267
commit e1e9cf930b

View File

@ -5,6 +5,7 @@ import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import org.jackhuang.hmcl.download.LibraryAnalyzer;
import org.jackhuang.hmcl.game.DefaultGameRepository;
@ -46,7 +47,7 @@ public class ModrinthModpackExportTask extends Task<Void> {
boolean isDisabled = repository.getModManager(version).isDisabled(file);
if (isDisabled) {
relativePath = repository.getModManager(version).enableMod(Path.of(relativePath)).toString();
relativePath = repository.getModManager(version).enableMod(Paths.get(relativePath)).toString();
}
LocalModFile localModFile = null;