mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
fix(storage): identify removable volumes by their configured path
This commit is contained in:
1 parent
df9734f0ca
commit
4628ae4c92
1 file changed
+3
-3
@@ -812,9 +812,9 @@ class SessionService : Service() {
|
||||
} else {
|
||||
Log.i(TAG, "game storage: internal only")
|
||||
}
|
||||
val removableLibrary = storageDiagnosticLibrary?.let {
|
||||
runCatching { Environment.isExternalStorageRemovable(it) }.getOrDefault(false)
|
||||
} ?: false
|
||||
val removableLibrary = storageDiagnosticLibrary != null && library?.let {
|
||||
runCatching { Environment.isExternalStorageRemovable(File(it.path)) }.getOrDefault(false)
|
||||
} == true
|
||||
val truncateAllocationSupported = storageDiagnosticLibrary?.takeIf { removableLibrary }?.let {
|
||||
StorageDiagnostics.truncateReservesSpace(it)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user