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 {
|
||||
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)
|
||||
sendViewPagerIntent(path)
|
||||
finish()
|
||||
|
|
Loading…
Reference in a new issue