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 4a5b48097..61fab13e4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -63,11 +63,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList return } else { val path = applicationContext.getRealPathFromURI(mUri) ?: "" - scanPath(mUri.path) {} - if (path.isNotEmpty()) { - sendViewPagerIntent(path) - finish() - return + if (path != mUri.toString()) { + scanPath(mUri.path) {} + if (path.isNotEmpty()) { + sendViewPagerIntent(path) + finish() + return + } } }