Exception throwing if mod couldn't create save dir.
This commit is contained in:
parent
b54a27b93a
commit
06e30f7f15
|
@ -54,8 +54,8 @@ public class SimpleAuth implements DedicatedServerModInitializer {
|
||||||
|
|
||||||
// Creating data directory (database and config files are stored there)
|
// Creating data directory (database and config files are stored there)
|
||||||
File file = new File(gameDirectory + "/mods/SimpleAuth/levelDBStore");
|
File file = new File(gameDirectory + "/mods/SimpleAuth/levelDBStore");
|
||||||
if (!file.exists() && !file.mkdir())
|
if (!file.exists() && !file.mkdirs())
|
||||||
LOGGER.error("[SimpleAuth] Error creating directory!");
|
throw new RuntimeException("[SimpleAuth] Error creating directory!");
|
||||||
// Loading config
|
// Loading config
|
||||||
config = AuthConfig.load(new File(gameDirectory + "/mods/SimpleAuth/config.json"));
|
config = AuthConfig.load(new File(gameDirectory + "/mods/SimpleAuth/config.json"));
|
||||||
// Connecting to db
|
// Connecting to db
|
||||||
|
|
Loading…
Reference in New Issue