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 16, 2024
1 parent 70dd8d5 commit 3ebfe95
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 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
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 3ebfe95

Please sign in to comment.