mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
add a directory check at renaming
This commit is contained in:
parent
9bb9e3496c
commit
81f543f792
1 changed files with 1 additions and 1 deletions
|
@ -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 = newDir.listFiles()
|
val files = if (newDir.isDirectory) newDir.listFiles() else arrayOf()
|
||||||
files.mapTo(updatedFiles) { it.absolutePath }
|
files.mapTo(updatedFiles) { it.absolutePath }
|
||||||
|
|
||||||
updatedFiles.add(newDir.absolutePath)
|
updatedFiles.add(newDir.absolutePath)
|
||||||
|
|
Loading…
Reference in a new issue