diff --git a/launcher/src/main/java/io/gitlab/jfronny/inceptum/launcher/system/importer/ModrinthImporter.java b/launcher/src/main/java/io/gitlab/jfronny/inceptum/launcher/system/importer/ModrinthImporter.java index d7f68b2..196a50e 100644 --- a/launcher/src/main/java/io/gitlab/jfronny/inceptum/launcher/system/importer/ModrinthImporter.java +++ b/launcher/src/main/java/io/gitlab/jfronny/inceptum/launcher/system/importer/ModrinthImporter.java @@ -42,8 +42,8 @@ public class ModrinthImporter extends Importer { protected void downloadMods(ModrinthModpackManifest manifest, Path instanceDir, ProcessState state) throws IOException { if (manifest.files() != null) { filesLoop: for (ModrinthModpackManifest.File file : manifest.files()) { - Path path = instanceDir.getParent().resolve(file.path()).toAbsolutePath().normalize(); - if (!path.startsWith(instanceDir)) throw new IOException("Pack attempted to write file outside instance. This is unsupported!"); + Path path = instanceDir.resolve(file.path()).toAbsolutePath().normalize(); + if (!path.startsWith(instanceDir)) throw new IOException("Pack attempted to write file outside instance which is dangerous and thus unsupported: " + path); String sha1 = file.hashes().sha1(); IOException failedDownload = new IOException("Could not download file"); for (String url : file.downloads()) {