Makes sure to only try and create the portal folder if it does not exist

This commit is contained in:
Kristian Knarvik 2021-09-09 15:42:30 +02:00
parent 3ac6270897
commit 8ae4ac3fc7

View File

@ -654,7 +654,7 @@ public class Stargate extends JavaPlugin {
}
}
File newFile = new File(portalFolder, getServer().getWorlds().get(0).getName() + ".db");
if (!newFile.exists()) {
if (!newFile.exists() && !newFile.getParentFile().exists()) {
if (!newFile.getParentFile().mkdirs()) {
log.severe("Unable to create portal database folder: " + newFile.getParentFile().getPath());
}