Store the local database inside a server-specific subdirectory

This commit is contained in:
Kai S. K. Engelbart 2020-09-23 16:19:53 +02:00
parent b9e19d69b9
commit 65e88fcfdb
Signed by: kske
GPG Key ID: 8BEB13EC5DF7EF13
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@ public final class Startup extends Application {
// Initialize the local database
try {
logger.info("Initializing LocalDB at " + config.getHomeDirectory());
localDB = new LocalDB(config.getHomeDirectory());
var localDBFile = new File(config.getHomeDirectory(), config.getServer());
logger.info("Initializing LocalDB at " + localDBFile);
localDB = new LocalDB(localDBFile);
} catch (IOException | EnvoyException e) {
logger.log(Level.SEVERE, "Could not initialize local database: ", e);
new Alert(AlertType.ERROR, "Could not initialize local database!\n" + e).showAndWait();