mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
fix: keep games being updated in the installed list for every store (#1989)
This commit is contained in:
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))
|
||||
|
||||
Reference in new issue
Block a user