Exception throwing if mod couldn't create save dir.

This commit is contained in:
samo_lego 2020-04-19 10:12:14 +02:00
parent b54a27b93a
commit 06e30f7f15
1 changed files with 2 additions and 2 deletions

View File

@ -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