Changed default database location from in-memory to a relative file.

This commit is contained in:
neviyn 2016-03-15 03:48:48 +00:00
parent 0b2ee3f4dd
commit fab04af5a6

View File

@ -60,7 +60,13 @@ public final class ConfigManager {
}
} catch (IOException ignored) {
}
return "jdbc:hsqldb:mem:."; // If not set use an in-memory database for now.
librarySettings.setProperty(databaseKey, "musicDB");
try(FileWriter fileWriter = new FileWriter(settingsFilename)){
librarySettings.store(fileWriter, "");
} catch (IOException e) {
e.printStackTrace();
}
return "jdbc:hsqldb:file:" + new File("musicDB").getAbsolutePath() + ";shutdown=true"; //Use relative file by default
}
/**