Write to the config file only at exit
This commit is contained in:
parent
994a377a26
commit
13898d9de0
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue