Skip to content

fix(drag): offer Merge when a moved folder meets a same-named folder - #2078

Merged
l0gicgate merged 1 commit into
mainfrom
fix/2076-drag-folder-merge
Nov 7, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
fix/2076-drag-folder-merge

Conversation

@l0gicgate

@l0gicgate l0gicgate commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Dragging a folder onto a same-named folder offered Replace but not Merge, because the conflict prompt limited Merge to copies. A same-filesystem drag is a move, so the only overwrite option discarded the existing folder. The adapter already supports merged moves, including deleting only the sources it read unchanged, so the prompt now offers Merge for moves too. This also applies to cut and paste and to Move To, which share the prompt.

A merged move can't be undone. It deletes its source and adds no Undo entry, as history already did for merged sources, while the originals it overwrites stay in Trash. Ctrl+Z after a merged move therefore undoes the operation before it. The prompt now says so before the choice. This is why Merge was copy-only until now, so please check that you are happy with this trade-off.

Merge is now refused where the target folder holds the source, for copies as well as moves, for example a/Photos/Photos into a. Merge staged the overwritten files first, which there included the source's own files, so they silently never arrived and the merge still reported success. Copies could already hit this, and drags would have made it easier to reach.

Visual evidence

Image

How to test

  1. Create a/Photos/one.txt and b/Photos/two.txt.
  2. Drag b/Photos into a, and click Merge in the conflict prompt.
  3. Create c/c/c/same.txt and c/c/same.txt, then drag c/c into the top folder that holds c.

Expected result: In step 2 the prompt offers Merge and says it can't be undone. Afterwards a/Photos holds both one.txt and two.txt, and b/Photos is gone. In step 3 the prompt offers Replace and Keep Both but not Merge.

Related issue

Closes #2076

Dragging or cutting a folder onto a same-named folder offered Replace but
not Merge, because Merge was limited to copies. The adapter already merges
moves and only deletes sources it read unchanged, so allow it in the prompt.

A merged move deletes its source and adds no Undo entry, so the prompt now
says it can't be undone.

Refuse Merge where the target holds the source, as when a/Photos/Photos goes
into a, for copies as well. Staging the overwritten files would take the
source's own files, and they would silently never arrive.
@github-actions github-actions Bot added the fix label Nov 7, 2026
@l0gicgate l0gicgate closed this Nov 7, 2026
@l0gicgate l0gicgate reopened this Nov 7, 2026
@l0gicgate
l0gicgate merged commit e693930 into main Nov 7, 2026
18 of 21 checks passed
@l0gicgate
l0gicgate deleted the fix/2076-drag-folder-merge branch November 7, 2026 07:49
wmfeht pushed a commit to wmfeht/strata-feature-map that referenced this pull request Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(drag): dragging a folder onto a same-named folder offers Replace but not Merge

1 participant