diff --git a/launcher/src/main/java/com/skcraft/launcher/Instance.java b/launcher/src/main/java/com/skcraft/launcher/Instance.java index 9fa4a02..d8ebf59 100644 --- a/launcher/src/main/java/com/skcraft/launcher/Instance.java +++ b/launcher/src/main/java/com/skcraft/launcher/Instance.java @@ -8,11 +8,13 @@ package com.skcraft.launcher; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.io.Files; import com.skcraft.launcher.launch.JavaProcessBuilder; import com.skcraft.launcher.model.modpack.LaunchModifier; import lombok.Data; import java.io.File; +import java.io.IOException; import java.net.URL; import java.util.Date; @@ -69,8 +71,10 @@ public class Instance implements Comparable { @JsonIgnore public File getContentDir() { File dir = new File(this.dir, "minecraft"); - if (!dir.exists()) { - dir.mkdirs(); + try { + Files.createParentDirs(dir); + dir.mkdir(); + } catch (IOException ignored) { } return dir; } diff --git a/launcher/src/main/java/com/skcraft/launcher/update/Updater.java b/launcher/src/main/java/com/skcraft/launcher/update/Updater.java index e1a1905..70fa583 100644 --- a/launcher/src/main/java/com/skcraft/launcher/update/Updater.java +++ b/launcher/src/main/java/com/skcraft/launcher/update/Updater.java @@ -66,6 +66,9 @@ public class Updater extends BaseUpdater implements Callable, Progress public Instance call() throws Exception { log.info("Checking for an update for '" + instance.getName() + "'..."); + // Force the directory to be created + instance.getContentDir(); + boolean updateRequired = !instance.isInstalled(); boolean updateDesired = (instance.isUpdatePending() || updateRequired); boolean updateCapable = (instance.getManifestURL() != null);