Skip to content

feat(fm): overwrite-on-conflict for copy/move (FM mandatory)#31

Merged
iret77 merged 1 commit into
mainfrom
feat/fm-overwrite
Jul 4, 2026
Merged

feat(fm): overwrite-on-conflict for copy/move (FM mandatory)#31
iret77 merged 1 commit into
mainfrom
feat/fm-overwrite

Conversation

@iret77

@iret77 iret77 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Same-filesystem copy/move no longer silently skips an existing target. On a conflict it pauses and asks: Overwrite / Skip / Overwrite all / Skip all, with the title-bar X (or click-outside) aborting the batch. "…all" applies the decision to every remaining conflict without re-prompting.

  • The batch is a resumable state machine (PendingCopyMove + an op queue); process_pending_copy_move drives it, opens Dialog::CopyMoveConflict on the first undecided conflict, and resumes from the dialog actions.
  • Overwrite replaces cleanly: the existing target (file or directory) is removed first, so a rename over a non-empty dir — or a copy into an existing tree — behaves as "replace".

Scope: the same-filesystem path (two panes on one machine — the primary two-panel workflow). Cross-connection overwrite still reports skips; that follows.

Verified: cargo check -p warp 0/0; 251 sftp tests green (3 new: conflict→dialog→overwrite replaces content, skip keeps, overwrite-all applies across a multi-file batch). No build triggered.

🤖 Generated with Claude Code

Same-filesystem copy/move no longer silently skips an existing target —
it pauses on a conflict dialog and lets the user decide: Overwrite,
Skip, Overwrite all, Skip all, or Cancel (the title-bar X / click-out
aborts the batch). "…all" applies the decision to every remaining
conflict without re-prompting.

- The batch is modelled as a resumable state machine (PendingCopyMove +
  a queue of ops); process_pending_copy_move drives it, opening
  Dialog::CopyMoveConflict on the first undecided conflict and resuming
  from the dialog actions.
- Overwrite replaces cleanly: the existing target (file or directory) is
  removed first, so a rename over a non-empty dir — or a copy into an
  existing tree — behaves as "replace".

Scope: same-filesystem path (two panes on one machine — the primary
two-panel workflow). Cross-connection overwrite still reports skips;
that follows.

Verified: cargo check -p warp 0/0; 251 sftp tests green (3 new:
conflict→dialog→overwrite replaces, skip keeps, overwrite-all applies
across a multi-file batch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@iret77 iret77 merged commit a8e97fe into main Jul 4, 2026
2 checks passed
@iret77 iret77 deleted the feat/fm-overwrite branch July 4, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant