Merge pull request #46354 from nextcloud/fix/45548-bug-duplicate-filefolder-names-delete-file-when-moving

stop file actions when conflict dialog skipped
This commit is contained in:
grnd-alt 2024-07-16 10:14:02 +02:00 committed by GitHub
commit 170849b3ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 10 deletions

View file

@ -128,11 +128,8 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth
try {
// Let the user choose what to do with the conflicting files
const { selected, renamed } = await openConflictPicker(destination.path, [node], otherNodes.contents)
// if the user selected to keep the old file, and did not select the new file
// that means they opted to delete the current node
// two empty arrays: either only old files or conflict skipped -> no action required
if (!selected.length && !renamed.length) {
await client.deleteFile(currentPath)
emit('files:node:deleted', node)
return
}
} catch (error) {

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long