From 758e52e030938ba256f8e0f2754bf734c0988864 Mon Sep 17 00:00:00 2001 From: kske Date: Wed, 23 Sep 2020 16:23:42 +0200 Subject: [PATCH] Store the Local Database Inside a Server-Specific Subdirectory (#45) Store the local database inside a server-specific subdirectory Reviewed-on: https://git.kske.dev/zdm/envoy/pulls/45 Reviewed-by: delvh --- client/src/main/java/envoy/client/ui/Startup.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/envoy/client/ui/Startup.java b/client/src/main/java/envoy/client/ui/Startup.java index 448a764..2e6b5d2 100644 --- a/client/src/main/java/envoy/client/ui/Startup.java +++ b/client/src/main/java/envoy/client/ui/Startup.java @@ -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();