diff --git a/gradle.properties b/gradle.properties index 657f8d3..5a6d2cf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_id=skyclientcosmetics mod_name=SkyClientCosmetics -mod_version=1.1.15 +mod_version=1.1.16 mod_archives_name=SkyClientCosmetics # Gradle Configuration -- DO NOT TOUCH THESE VALUES. diff --git a/src/main/kotlin/co/skyclient/scc/gui/greeting/ImportSlide.kt b/src/main/kotlin/co/skyclient/scc/gui/greeting/ImportSlide.kt index 8e11085..d34e425 100644 --- a/src/main/kotlin/co/skyclient/scc/gui/greeting/ImportSlide.kt +++ b/src/main/kotlin/co/skyclient/scc/gui/greeting/ImportSlide.kt @@ -91,8 +91,18 @@ class ImportSlide : GreetingSlide(OptimizationSlide::class.ja val file = File(parentConfig, location) if (file.exists()) { progressText.setText("Copying \"$location\"...") - file.copyRecursively(File(Launch.minecraftHome, location), overwrite = true, onError = { _, _ -> OnErrorAction.SKIP }) - Thread.sleep(500) + var errored = false + File(Launch.minecraftHome, location).copyRecursively(File(Launch.minecraftHome, location + "-backup"), overwrite = true, onError = { _, _ -> + errored = true + return@copyRecursively OnErrorAction.SKIP + }) + if (errored) { + progressText.setText("${ChatColor.RED}\"$location\" failed to copy a backup, skipping...") + Thread.sleep(1000) + } else { + file.copyRecursively(File(Launch.minecraftHome, location), overwrite = true, onError = { _, _ -> OnErrorAction.SKIP }) + Thread.sleep(500) + } } else { progressText.setText("${ChatColor.RED}\"$location\" not found, skipping...") Thread.sleep(1000)