fix(storage): identify removable volumes by their configured path

This commit is contained in:
xXJsonDeruloXx committed 2026-10-04 17:22:01 -04:00
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)
}