trim the slash from the end of selected paths

This commit is contained in:
tibbi 2017-03-18 18:52:23 +01:00
parent 343bca34a7
commit 411081ba98

View file

@ -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()
}