Create standalone directory, if needed, during storage startup

This commit is contained in:
Mike Primm 2022-02-04 20:09:07 -06:00
parent e1af7ad952
commit 716635c20e
2 changed files with 8 additions and 0 deletions

View File

@ -326,6 +326,10 @@ public class MySQLMapStorage extends MapStorage {
cfgfile.delete(); // Zap file (in case we left junk from last time)
return true;
}
// During initial startup, this can happen before baseStandaloneDir is setup
if (!baseStandaloneDir.exists()) {
baseStandaloneDir.mkdirs();
}
FileWriter fw = null;
try {
fw = new FileWriter(cfgfile);

View File

@ -313,6 +313,10 @@ public class PostgreSQLMapStorage extends MapStorage {
cfgfile.delete(); // Zap file (in case we left junk from last time)
return true;
}
// During initial startup, this can happen before baseStandaloneDir is setup
if (!baseStandaloneDir.exists()) {
baseStandaloneDir.mkdirs();
}
FileWriter fw = null;
try {
fw = new FileWriter(cfgfile);