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