Database location is interpreted as a file to ensure that relative locations work properly.

This commit is contained in:
neviyn 2016-02-26 16:12:27 +00:00
parent 4e668954a9
commit 069e75b4cd
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@ -69,4 +69,5 @@ buildNumber.properties
# Created by .ignore support plugin (hsz.mobi)
settings.cfg
settings.cfg
testdb.*

View File

@ -45,7 +45,7 @@ public final class ConfigManager {
try (FileInputStream inputStream = new FileInputStream(propertiesFile)) {
librarySettings.load(inputStream);
if (librarySettings.containsKey(databaseKey)) {
return "jdbc:hsqldb:file:" + librarySettings.getProperty(databaseKey) + ";shutdown=true";
return "jdbc:hsqldb:file:" + new File(librarySettings.getProperty(databaseKey)).getAbsolutePath() + ";shutdown=true";
}
} catch (IOException ignored) {
}