diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index 654d9108..6a6dcb57 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -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