We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0187fb3 commit 534a64cCopy full SHA for 534a64c
app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt
@@ -96,7 +96,15 @@ class MainActivity : SimpleActivity() {
96
}
97
98
private fun openPath(path: String) {
99
- (fragment_holder as ItemsFragment).openPath(path)
+ var newPath = path
100
+ val file = File(path)
101
+ if (file.exists() && !file.isDirectory) {
102
+ newPath = file.parent
103
+ } else if (!file.exists()) {
104
+ newPath = internalStoragePath
105
+ }
106
+
107
+ (fragment_holder as ItemsFragment).openPath(newPath)
108
invalidateOptionsMenu()
109
110
0 commit comments