mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
get proper path at returning a third party intent result
This commit is contained in:
parent
abc7067eed
commit
d52c3df88f
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue