add a check if the owner file from extended details exists

This commit is contained in:
tibbi 2017-10-28 19:04:30 +02:00
parent b1019af51b
commit 883e3ad6c1

View file

@ -20,6 +20,9 @@ abstract class ViewPagerFragment : Fragment() {
fun getMediumExtendedDetails(medium: Medium): String { fun getMediumExtendedDetails(medium: Medium): String {
val file = File(medium.path) val file = File(medium.path)
if (!file.exists())
return ""
val path = "${file.parent.trimEnd('/')}/" val path = "${file.parent.trimEnd('/')}/"
val exif = android.media.ExifInterface(medium.path) val exif = android.media.ExifInterface(medium.path)
val details = StringBuilder() val details = StringBuilder()