mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
properly handle going back to root of the USB storage in some cases
This commit is contained in:
@ -234,7 +234,9 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
var newPath = path
|
||||
val file = File(path)
|
||||
if (file.exists() && !file.isDirectory) {
|
||||
if (config.OTGPath.isNotEmpty() && config.OTGPath == path.trimEnd('/')) {
|
||||
newPath = path
|
||||
} else if (file.exists() && !file.isDirectory) {
|
||||
newPath = file.parent
|
||||
} else if (!file.exists() && !isPathOnOTG(newPath)) {
|
||||
newPath = internalStoragePath
|
||||
|
Reference in New Issue
Block a user