Skip to content
Snippets Groups Projects
Verified Commit 620c93f4 authored by Griefed's avatar Griefed :joystick:
Browse files

fix: Append .conf to config files during saving if they don't end with it

parent 5cfb9db5
No related branches found
No related tags found
2 merge requests!614Fixes and tests,!613MS8
......@@ -476,7 +476,12 @@ open class PackConfig() {
conf.setComment(pluginsKey, pluginsComment)
conf.set<Any>(pluginsKey, plugins)
TomlFormat.instance().createWriter().write(conf, destination, WritingMode.REPLACE, StandardCharsets.UTF_8)
val confFile = if (!destination.name.endsWith(".conf")) {
File( "${destination.absolutePath}.conf")
} else {
destination
}
TomlFormat.instance().createWriter().write(conf, confFile, WritingMode.REPLACE, StandardCharsets.UTF_8)
log.debug("Saved config to ${destination.absolutePath}")
return this
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment