From 06e30f7f152c2baab45693cb2363b3f0a81143b3 Mon Sep 17 00:00:00 2001 From: samo_lego <34912839+samolego@users.noreply.github.com> Date: Sun, 19 Apr 2020 10:12:14 +0200 Subject: [PATCH] Exception throwing if mod couldn't create save dir. --- src/main/java/org/samo_lego/simpleauth/SimpleAuth.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/samo_lego/simpleauth/SimpleAuth.java b/src/main/java/org/samo_lego/simpleauth/SimpleAuth.java index 9a1a962..4d4b55a 100644 --- a/src/main/java/org/samo_lego/simpleauth/SimpleAuth.java +++ b/src/main/java/org/samo_lego/simpleauth/SimpleAuth.java @@ -54,8 +54,8 @@ public class SimpleAuth implements DedicatedServerModInitializer { // Creating data directory (database and config files are stored there) File file = new File(gameDirectory + "/mods/SimpleAuth/levelDBStore"); - if (!file.exists() && !file.mkdir()) - LOGGER.error("[SimpleAuth] Error creating directory!"); + if (!file.exists() && !file.mkdirs()) + throw new RuntimeException("[SimpleAuth] Error creating directory!"); // Loading config config = AuthConfig.load(new File(gameDirectory + "/mods/SimpleAuth/config.json")); // Connecting to db