From 5c929f43ed252f146f86f75987253019f1544a59 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 6 Nov 2017 17:29:03 +0100 Subject: [PATCH] do the empty path check earlier at PhotoVideoActivity --- .../gallery/activities/PhotoVideoActivity.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 } }