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
1 changed files with 3 additions and 0 deletions

View File

@ -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()