working on configuration

This commit is contained in:
2022-04-15 11:33:28 +02:00
parent 0b13726d25
commit 26df2e5654
12 changed files with 162 additions and 118 deletions

View File

@@ -127,10 +127,10 @@ public class Database {
public static Database open() {
if (singleton == null){
Configuration config = Configuration.instance();
String dbFile = config.dbLocation();
var dbFile = config.dbFile();
String url = "jdbc:sqlite:"+dbFile;
LOG.debug("Opening {}",url);
new File(dbFile).getParentFile().mkdirs();
dbFile.getParentFile().mkdirs();
try {
singleton = new Database(DriverManager.getConnection(url)).assertTables();
} catch (SQLException sqle) {