make sure there is no extra slash at the save path

This commit is contained in:
tibbi 2018-02-27 20:06:56 +01:00
parent 6a9e039718
commit 73637c6305
1 changed files with 1 additions and 1 deletions

View File

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