Database location is interpreted as a file to ensure that relative locations work properly.
This commit is contained in:
parent
4e668954a9
commit
069e75b4cd
1
.gitignore
vendored
1
.gitignore
vendored
@ -70,3 +70,4 @@ buildNumber.properties
|
|||||||
# Created by .ignore support plugin (hsz.mobi)
|
# Created by .ignore support plugin (hsz.mobi)
|
||||||
|
|
||||||
settings.cfg
|
settings.cfg
|
||||||
|
testdb.*
|
@ -45,7 +45,7 @@ public final class ConfigManager {
|
|||||||
try (FileInputStream inputStream = new FileInputStream(propertiesFile)) {
|
try (FileInputStream inputStream = new FileInputStream(propertiesFile)) {
|
||||||
librarySettings.load(inputStream);
|
librarySettings.load(inputStream);
|
||||||
if (librarySettings.containsKey(databaseKey)) {
|
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) {
|
} catch (IOException ignored) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user