check if the destination file exists at move

This commit is contained in:
tibbi 2017-03-15 22:12:28 +01:00
parent 9f91e14a32
commit 597ffd5a57

View File

@ -78,7 +78,7 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
updatedFiles.addAll(files)
for (file in files) {
val destination = File(destinationDir, file.name)
if (file.renameTo(destination))
if (!destination.exists() && file.renameTo(destination))
updatedFiles.add(destination)
}