get proper path at returning a third party intent result
This commit is contained in:
parent
abc7067eed
commit
d52c3df88f
|
@ -537,7 +537,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun fillIntentPath(resultData: Intent, resultIntent: Intent) {
|
||||
val path = resultData.data.path
|
||||
val data = resultData.data
|
||||
val path = if (data.toString().startsWith("/")) data.toString() else data.path
|
||||
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
|
||||
val type = path.getMimeType()
|
||||
resultIntent.setDataAndTypeAndNormalize(uri, type)
|
||||
|
|
Loading…
Reference in New Issue