Store the Local Database Inside a Server-Specific Subdirectory #45
@@ -70,8 +70,9 @@ public final class Startup extends Application {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// Initialize the local database
 | 
							// Initialize the local database
 | 
				
			||||||
		try {
 | 
							try {
 | 
				
			||||||
			logger.info("Initializing LocalDB at " + config.getHomeDirectory());
 | 
								var localDBFile = new File(config.getHomeDirectory(), config.getServer());
 | 
				
			||||||
			localDB = new LocalDB(config.getHomeDirectory());
 | 
								logger.info("Initializing LocalDB at " + localDBFile);
 | 
				
			||||||
 | 
								localDB = new LocalDB(localDBFile);
 | 
				
			||||||
		} catch (IOException | EnvoyException e) {
 | 
							} catch (IOException | EnvoyException e) {
 | 
				
			||||||
			logger.log(Level.SEVERE, "Could not initialize local database: ", e);
 | 
								logger.log(Level.SEVERE, "Could not initialize local database: ", e);
 | 
				
			||||||
			new Alert(AlertType.ERROR, "Could not initialize local database!\n" + e).showAndWait();
 | 
								new Alert(AlertType.ERROR, "Could not initialize local database!\n" + e).showAndWait();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user