From c0d446a3a4506ddc48e96a6c54b6b97ae38e2aef Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 14 Apr 2018 21:58:26 +0200 Subject: [PATCH] use better default file save path at Edit, if available --- .../com/simplemobiletools/gallery/activities/EditActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 fd9e8918f..96f3e20ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -191,7 +191,8 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener if (newPath.isEmpty()) { val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: "" if (filename.isNotEmpty()) { - newPath = "$internalStoragePath/$filename" + val path = if (intent.extras?.containsKey(REAL_FILE_PATH) == true) intent.getStringExtra(REAL_FILE_PATH).getParentPath() else internalStoragePath + newPath = "$path/$filename" shouldAppendFilename = false } }