Assign the result variable to a parsed file in the try-catch statement of Configuration.kt

This commit is contained in:
Username404-59 2021-04-23 15:50:47 +02:00
parent 1c3981a81a
commit 5f96c53845
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 3 deletions

View File

@ -24,10 +24,10 @@ object Configuration {
createNewFile()
setWritable(true)
setReadable(true)
} else result = try {
ConfigFactory.parseFile(file)
} else try {
result = ConfigFactory.parseFile(file)
} catch (e: ConfigException) {
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead."); result
Snowy.logs.warn("Could not parse the snowy configuration file, the default configuration will be used instead.")
}
}
ConfigFactory.load(result).getConfig("Snowy").resolveWith(baseConf)