mirror of
https://github.com/CCBlueX/LiquidBounce.git
synced 2025-09-06 09:46:38 +00:00
fix(compatibility/LunarClient): wrap backup in try catch (#5974)
Also reverts a0f3a8d26d
This commit is contained in:
@@ -71,6 +71,8 @@ final excludeProvidedLibs = {
|
||||
exclude group: "net.java.dev.jna", module: "jna"
|
||||
exclude group: "commons-codec", module: "commons-codec"
|
||||
exclude group: "commons-io", module: "commons-io"
|
||||
exclude group: "org.apache.commons", module: "commons-compress"
|
||||
exclude group: "org.apache.commons", module: "commons-lang3"
|
||||
exclude group: "org.apache.logging.log4j", module: "log4j-core"
|
||||
exclude group: "org.apache.logging.log4j", module: "log4j-api"
|
||||
exclude group: "org.apache.logging.log4j", module: "log4j-slf4j-impl"
|
||||
|
@@ -107,8 +107,10 @@ object ConfigSystem {
|
||||
/**
|
||||
* Create a ZIP file of root configurable files
|
||||
*/
|
||||
fun backup(fileName: String) {
|
||||
fun backup(fileName: String) = runCatching {
|
||||
configurables.map { it.jsonFile }.createZipArchive(File(rootFolder, fileName))
|
||||
}.onFailure {
|
||||
logger.error("Unable to create backup", it)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user