mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
fix(xbox): mount selected SD library in Xodus
This commit is contained in:
1 parent
2c8ae3753c
commit
4a0eb14d1f
5 files changed
+34
-3
No files matched your search
@@ -49,6 +49,20 @@ class StoreInstallRootTest {
|
||||
File(cardRoot.parentFile, "Games-old/Stores/Xbox/Doom"), roots))
|
||||
}
|
||||
|
||||
@Test fun xodusMapsTheSelectedSteamLibraryOnAnExternalVolume() {
|
||||
val library = File(app.filesDir, "card/steam").apply { mkdirs() }
|
||||
val storeRoot = File(library, "Games").apply { mkdirs() }
|
||||
SessionPrefs.setGameStorage(app, library.path, "Card")
|
||||
|
||||
val xodusRoot = StoreInstallRoot.externalRootsForXodus(app).single { it.first.absolutePath == storeRoot.absolutePath }
|
||||
val gameFolder = File(storeRoot, "Xbox/Doom")
|
||||
assertEquals("${xodusRoot.second}/Xbox/Doom", StoreInstallRoot.guestPathForXodus(app, gameFolder))
|
||||
|
||||
val bindSpecs = StoreInstallRoot.externalBindSpecsForXodus(app)
|
||||
assertTrue(bindSpecs.contains("${storeRoot.path}:${xodusRoot.second}"))
|
||||
assertTrue(File(LinuxRuntime.rootDir(app), xodusRoot.second.removePrefix("/")).isDirectory)
|
||||
}
|
||||
|
||||
@Test fun externalStoreBindsCreateGuestTargetsAndSkipUnavailableVolumes() {
|
||||
val host = File(app.filesDir, "card/Games").apply { mkdirs() }
|
||||
val guestRoot = "/mnt/droiddeck-stores/card"
|
||||
|
||||
Reference in new issue
Block a user