From 093fe92596fc54d5d33feeb4c3a090ffae44376e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 14 Apr 2018 21:51:48 +0200 Subject: [PATCH] fix path fetching from content uri at editing --- .../simplemobiletools/gallery/activities/EditActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index 74e8662cb..fd9e8918f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -189,8 +189,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener var newPath = applicationContext.getRealPathFromURI(saveUri) ?: "" var shouldAppendFilename = true if (newPath.isEmpty()) { - newPath = applicationContext.getFilenameFromContentUri(saveUri) ?: "" - shouldAppendFilename = false + val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: "" + if (filename.isNotEmpty()) { + newPath = "$internalStoragePath/$filename" + shouldAppendFilename = false + } } if (newPath.isEmpty()) {