Keep the install record out of update merges and drop update results that went stale mid-check

This commit is contained in:
FX192 committed 2026-10-27 14:53:06 +03:00
1 parent efaf5bf9b7
commit 2cce33d6f8
3 files changed
+19 -2

No files matched your search

@@ -71,4 +71,15 @@ class ItchStagingTest {
assertFalse(File(outside, "level.dat").exists())
assertEquals("new", File(game, "data/level.dat").readText())
}
@Test fun theInstallRecordIsNeverReplacedByTheArchive() {
val game = tmp.newFolder("game")
val staged = tmp.newFolder("staged")
file(game, ".droiddeck-store.json", "record")
file(staged, ".droiddeck-store.json", "forged")
file(staged, "sub/.droiddeck-store.json", "nested")
ItchStaging.merge(staged, game)
assertEquals("record", File(game, ".droiddeck-store.json").readText())
assertEquals("nested", File(game, "sub/.droiddeck-store.json").readText())
}
}