mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix(storage): a Second library folder that is there is used even when its volume state isn't mounted (#2258)
fix(storage): a saved game folder that is there stays the library
This commit is contained in:
1 parent
e4a4775be5
commit
15baa296bb
2 files changed
+10
-1
No files matched your search
@@ -95,6 +95,14 @@ class GameStorageTest {
|
||||
assertFalse(GameStorage.attached(File("/mnt/media_rw/B2BD-BCFC/STEAM GAMES")) { null })
|
||||
}
|
||||
|
||||
@Test fun aSavedFolderThatIsThereIsAttachedWhateverItsVolumeReports() {
|
||||
val folder = tmp.newFolder("card", "STEAM GAMES")
|
||||
listOf(Environment.MEDIA_UNKNOWN, Environment.MEDIA_UNMOUNTED, Environment.MEDIA_REMOVED, null).forEach {
|
||||
assertTrue(GameStorage.attached(folder, it, externalStoragePath = true))
|
||||
}
|
||||
assertTrue(GameStorage.attached(folder) { Environment.MEDIA_UNKNOWN })
|
||||
}
|
||||
|
||||
@Test fun onlyASavedDriveThatIsMissingCountsAsDisconnected() {
|
||||
SessionPrefs.setGameStorage(app, "", "")
|
||||
assertFalse(GameStorage.disconnected(app))
|
||||
|
||||
Reference in new issue
Block a user