mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-15 18:07:54 +01:00
check if the destination file exists at move
This commit is contained in:
parent
9f91e14a32
commit
597ffd5a57
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user