add a file.exists() check too

This commit is contained in:
tibbi 2017-09-11 21:34:23 +02:00
parent 624c0e2d08
commit 28ccfb6fe1

View file

@ -139,6 +139,9 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
}
if (!isExcluded || isThirdPartyIntent) {
if (!file.exists())
continue
val dateTaken = cur.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
val dateModified = cur.getIntValue(MediaStore.Images.Media.DATE_MODIFIED) * 1000L