Skip to content

Commit

Permalink
fix: stop file actions when conflict dialog skipped
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
  • Loading branch information
grnd-alt committed Jul 11, 2024
1 parent b94a1f7 commit f53f43f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f53f43f

Please sign in to comment.