Create standalone directory, if needed, during storage startup
This commit is contained in:
parent
e1af7ad952
commit
716635c20e
2 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue