try opening folders from content uris too
This commit is contained in:
parent
534a64c2f3
commit
5dc8907944
|
@ -88,8 +88,18 @@ class MainActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initFileManager() {
|
private fun initFileManager() {
|
||||||
if (intent.action == Intent.ACTION_VIEW && intent.data != null && intent.data.scheme == "file") {
|
if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
|
||||||
openPath(intent.data.path)
|
val data = intent.data
|
||||||
|
if (data.scheme == "file") {
|
||||||
|
openPath(data.path)
|
||||||
|
} else {
|
||||||
|
val path = getRealPathFromURI(data)
|
||||||
|
if (path != null) {
|
||||||
|
openPath(path)
|
||||||
|
} else {
|
||||||
|
openPath(config.homeFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
openPath(config.homeFolder)
|
openPath(config.homeFolder)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue