From 883e3ad6c1819537ac7df5e018a92603de4a8ea0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 28 Oct 2017 19:04:30 +0200 Subject: [PATCH] add a check if the owner file from extended details exists --- .../simplemobiletools/gallery/fragments/ViewPagerFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt index 31a2888c4..e495e4168 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/ViewPagerFragment.kt @@ -20,6 +20,9 @@ abstract class ViewPagerFragment : Fragment() { fun getMediumExtendedDetails(medium: Medium): String { val file = File(medium.path) + if (!file.exists()) + return "" + val path = "${file.parent.trimEnd('/')}/" val exif = android.media.ExifInterface(medium.path) val details = StringBuilder()