Make sure "UserConfig" is up-to-date (#590)

Currently, the "UserConfig" was created in case it was missing.
But in case settings changed (added/removed), an already existing "UserConfig" never reflected these changes and thus, was out of date
This commit is contained in:
schroda
2023-07-02 17:48:08 +02:00
committed by GitHub
parent 5372ef8f0c
commit b4d37f9ba2
2 changed files with 41 additions and 5 deletions
@@ -104,7 +104,7 @@ fun applicationSetup() {
// start app
androidCompat.startApp(App())
// create conf file if doesn't exist
// create or update conf file if doesn't exist
try {
val dataConfFile = File("${applicationDirs.dataRoot}/server.conf")
if (!dataConfFile.exists()) {
@@ -113,6 +113,9 @@ fun applicationSetup() {
input.copyTo(output)
}
}
} else {
// make sure the user config file is up-to-date
GlobalConfigManager.updateUserConfig()
}
} catch (e: Exception) {
logger.error("Exception while creating initial server.conf", e)