fix: keep games being updated in the installed list for every store (#1989)

This commit is contained in:
FX1922 authored and GitHub committed 2026-11-01 22:05:39 -05:00
1 parent 40dfcd94f9
commit 57b7c99b9a
3 files changed
+11 -2

No files matched your search

@@ -201,6 +201,15 @@ class StoreInstallRootTest {
assertTrue(StoreInstallRoot.unfinished(app).none { it.folder.absolutePath == half.absolutePath })
}
@Test fun aGameBeingUpdatedIsNotAnUnfinishedInstallForAnyStore() {
SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "")
for (store in listOf(Store.EPIC, Store.ITCH, Store.XBOX, Store.AMAZON)) {
val folder = File(StoreInstallRoot.storeDir(StoreInstallRoot.internalRoot(app), store), StoreInstallRoot.folderName("Updating", "u1")).apply { mkdirs() }
StoreGameSidecar(store, "u1", "Updating", "Updating.exe", state = StoreGameSidecar.STATE_UPDATING).write(folder)
assertTrue(StoreInstallRoot.unfinished(app).none { it.folder.absolutePath == folder.absolutePath })
}
}
@Test fun theScratchCacheIsPrivateAndNamedSafely() {
val dir = StoreInstallRoot.scratchDir(app, Store.EPIC, "a/b:c")
assertTrue(dir.absolutePath.startsWith(app.cacheDir.absolutePath))