From 73637c6305c87352632d04bebc0655866309b67d Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 27 Feb 2018 20:06:56 +0100 Subject: [PATCH] make sure there is no extra slash at the save path --- .../com/simplemobiletools/draw/dialogs/SaveImageDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt b/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt index dbd915d..f4c5fdd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt @@ -55,7 +55,7 @@ class SaveImageDialog(val activity: SimpleActivity, val defaultExtension: String else -> JPG } - val newPath = "$folder/$filename.$extension" + val newPath = "${folder.trimEnd('/')}/$filename.$extension" if (!newPath.getFilenameFromPath().isAValidFilename()) { activity.toast(R.string.filename_invalid_characters) return@setOnClickListener