Skip to content

Commit 3622ca8

Browse files
committed
properly handle going back to root of the USB storage in some cases
1 parent 307e10d commit 3622ca8

File tree

1 file changed

+3
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities

1 file changed

+3
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ class MainActivity : SimpleActivity() {
234234

235235
var newPath = path
236236
val file = File(path)
237-
if (file.exists() && !file.isDirectory) {
237+
if (config.OTGPath.isNotEmpty() && config.OTGPath == path.trimEnd('/')) {
238+
newPath = path
239+
} else if (file.exists() && !file.isDirectory) {
238240
newPath = file.parent
239241
} else if (!file.exists() && !isPathOnOTG(newPath)) {
240242
newPath = internalStoragePath

0 commit comments

Comments
 (0)