do the empty path check earlier at PhotoVideoActivity

This commit is contained in:
tibbi 2017-11-06 17:29:03 +01:00
parent 124d44dfb9
commit 5c929f43ed

View file

@ -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
}
}