mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-18 12:50:35 +01:00
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() {
|
||||
if (intent.action == Intent.ACTION_VIEW && intent.data != null && intent.data.scheme == "file") {
|
||||
openPath(intent.data.path)
|
||||
if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
|
||||
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 {
|
||||
openPath(config.homeFolder)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user