diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt index 68b33e1f9..a6f1d8019 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt @@ -21,7 +21,6 @@ import com.simplemobiletools.commons.views.RecyclerViewDivider import kotlinx.android.synthetic.main.dialog_filepicker.view.* import java.io.File import java.util.* -import kotlin.comparisons.compareBy /** * The only filepicker constructor with a couple optional parameters @@ -106,7 +105,7 @@ class FilePickerDialog(val activity: BaseSimpleActivity, private fun createNewFolder() { CreateNewFolderDialog(activity, currPath) { - callback.invoke(it) + callback.invoke(it.trimEnd('/')) mDialog.dismiss() } } @@ -154,7 +153,7 @@ class FilePickerDialog(val activity: BaseSimpleActivity, } private fun sendSuccess() { - callback.invoke(currPath) + callback.invoke(currPath.trimEnd('/')) mDialog.dismiss() }