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 534a64c commit 5dc8907Copy full SHA for 5dc8907
app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt
@@ -88,8 +88,18 @@ class MainActivity : SimpleActivity() {
88
}
89
90
private fun initFileManager() {
91
- if (intent.action == Intent.ACTION_VIEW && intent.data != null && intent.data.scheme == "file") {
92
- openPath(intent.data.path)
+ if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
+ val data = intent.data
93
+ if (data.scheme == "file") {
94
+ openPath(data.path)
95
+ } else {
96
+ val path = getRealPathFromURI(data)
97
+ if (path != null) {
98
+ openPath(path)
99
100
+ openPath(config.homeFolder)
101
+ }
102
103
} else {
104
openPath(config.homeFolder)
105
0 commit comments