mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #721, check if a file exists before opening it in the viewpager screen
This commit is contained in:
@ -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()
|
||||||
|
Reference in New Issue
Block a user