Skip to content

Commit

Permalink
fix(UpdateChecker): Cleanup PGP signature file
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Feb 11, 2025
1 parent d74d4e3 commit 1225f52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/core/UpdateChecker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion
import java.io.File
import java.nio.file.Files
import java.nio.file.StandardCopyOption
import kotlin.io.path.deleteIfExists
import kotlin.io.path.moveTo

object UpdateChecker {
Expand Down Expand Up @@ -77,6 +77,7 @@ object UpdateChecker {
"${if (oldJar.name.startsWith("!")) "!" else ""}${nameNoExtension}${if (oldJar.endsWith(".temp.jar") && newExtension == oldJar.extension) ".temp.jar" else ".$newExtension"}"
)
newJar.toPath().moveTo(newLocation.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE)
newJar.toPath().resolveSibling("${newJar.name}.asc").deleteIfExists()
if (oldJar.delete()) {
println("successfully deleted the files. skipping install tasks")
return@Thread
Expand Down

0 comments on commit 1225f52

Please sign in to comment.