mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 19:11:08 +00:00
Fix the itch update cache reader for Kotlin 2.1 and keep symlinked staged entries out of the merge recursion
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ internal object ItchUpdates {
|
||||
val out = LinkedHashMap<String, ItchUpdate>()
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user