diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index d0879b481..960db4d14 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -65,13 +65,11 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList return } else { val path = applicationContext.getRealPathFromURI(mUri!!) ?: "" - if (path != mUri.toString()) { + if (path != mUri.toString() && path.isNotEmpty()) { scanPath(mUri!!.path) {} - if (path.isNotEmpty()) { - sendViewPagerIntent(path) - finish() - return - } + sendViewPagerIntent(path) + finish() + return } }