lets define File type too

This commit is contained in:
tibbi 2016-12-11 22:34:55 +01:00
parent 81f543f792
commit 33af23878a

View file

@ -69,7 +69,7 @@ class RenameDirectoryDialog(val activity: SimpleActivity, val dir: File, val cal
private fun sendSuccess(updatedFiles: ArrayList<String>, newDir: File) { private fun sendSuccess(updatedFiles: ArrayList<String>, newDir: File) {
activity.toast(R.string.renaming_folder) activity.toast(R.string.renaming_folder)
val files = if (newDir.isDirectory) newDir.listFiles() else arrayOf() val files = if (newDir.isDirectory) newDir.listFiles() else arrayOf<File>()
files.mapTo(updatedFiles) { it.absolutePath } files.mapTo(updatedFiles) { it.absolutePath }
updatedFiles.add(newDir.absolutePath) updatedFiles.add(newDir.absolutePath)