fix #721, check if a file exists before opening it in the viewpager screen
This commit is contained in:
parent
0cb331d126
commit
b872ca9233
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
||||||
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.')) {
|
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && File(path).exists()) {
|
||||||
scanPathRecursively(mUri!!.path)
|
scanPathRecursively(mUri!!.path)
|
||||||
sendViewPagerIntent(path)
|
sendViewPagerIntent(path)
|
||||||
finish()
|
finish()
|
||||||
|
|
Loading…
Reference in a new issue