mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-28 18:29:29 +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)
|
updatedFiles.addAll(files)
|
||||||
for (file in files) {
|
for (file in files) {
|
||||||
val destination = File(destinationDir, file.name)
|
val destination = File(destinationDir, file.name)
|
||||||
if (file.renameTo(destination))
|
if (!destination.exists() && file.renameTo(destination))
|
||||||
updatedFiles.add(destination)
|
updatedFiles.add(destination)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user