Write to the config file only at exit

This commit is contained in:
Username404-59 2021-04-23 15:38:55 +02:00
parent 994a377a26
commit 13898d9de0
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 2 deletions

View File

@ -23,9 +23,8 @@ object Configuration {
if (!exists()) { if (!exists()) {
createNewFile() createNewFile()
setWritable(true) setWritable(true)
writeText(base)
setReadable(true) setReadable(true)
}; result = try { } else result = try {
ConfigFactory.parseFile(file) ConfigFactory.parseFile(file)
} catch (e: ConfigException) { } catch (e: ConfigException) {
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); baseConf Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); baseConf