From 0a7397cd0e83f8fdafcfaf1e628f5916754e63b2 Mon Sep 17 00:00:00 2001 From: FX192 <120828496+FX192@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:25:42 +0300 Subject: [PATCH] Fix the itch update cache reader for Kotlin 2.1 and keep symlinked staged entries out of the merge recursion --- .../java/com/droiddeck/launcher/stores/itch/ItchStaging.kt | 2 +- .../java/com/droiddeck/launcher/stores/itch/ItchUpdates.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchStaging.kt b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchStaging.kt index 27426650c..b44201d8d 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchStaging.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchStaging.kt @@ -10,7 +10,7 @@ internal object ItchStaging { for (child in from.listFiles().orEmpty()) { val dest = File(to, child.name) val destPath = dest.toPath() - if (child.isDirectory && dest.isDirectory && !Files.isSymbolicLink(destPath)) { + if (child.isDirectory && !Files.isSymbolicLink(child.toPath()) && dest.isDirectory && !Files.isSymbolicLink(destPath)) { merge(child, dest) continue } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchUpdates.kt b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchUpdates.kt index f7656b017..f35ab4218 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchUpdates.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/itch/ItchUpdates.kt @@ -57,7 +57,8 @@ internal object ItchUpdates { val out = LinkedHashMap() for (key in json.keys()) { val u = json.optJSONObject(key) ?: continue - val id = u.optString("uploadId").ifBlank { continue } + val id = u.optString("uploadId") + if (id.isBlank()) continue out[key] = ItchUpdate(id, u.optString("updatedAt"), u.optString("filename"), u.optBoolean("replaced")) } return out