diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt index abf8a97d4..49a9a6a15 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt @@ -78,7 +78,7 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList, 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) }