adding an extra check at third party intents about file existance

This commit is contained in:
tibbi 2019-03-28 22:08:00 +01:00
parent 2c2a922c60
commit 0846c21711

View file

@ -95,7 +95,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
if (intent.extras?.containsKey(REAL_FILE_PATH) == true) {
val realPath = intent.extras!!.getString(REAL_FILE_PATH)
if (realPath != null) {
if (realPath != null && File(realPath).exists()) {
if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) {
sendViewPagerIntent(realPath)
finish()