Commit 0fbafeb
committed
Bugfix: Volume copy dialog hung after cancel
- Cancelling a multi-file volume copy mid-stream (SMB, MTP) left the Copy dialog open until app restart. A per-task `VolumeError::Cancelled` lands in `copy_error` mapped to `WriteOperationError::Cancelled`, so the post-loop's `if copy_error.is_none() { emit_cancelled }` gate skipped the terminal event. The outer `copy_between_volumes` wrapper then assumed the inner had already emitted, so the FE saw no `write-cancelled` and the dialog wedged.
- The post-loop now reclassifies a Cancelled-shaped `copy_error` as cancellation (`copy_error = None`) when `is_cancelled(&state.intent)` is true, restoring the `emit_cancelled` path. The synthetic `Err(Cancelled)` return still propagates so the outer wrapper continues to skip `write-error`.
- Pinned with a Gotcha in `write_operations/CLAUDE.md`.1 parent 38ebdc8 commit 0fbafeb
2 files changed
Lines changed: 19 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1146 | 1162 | | |
1147 | 1163 | | |
1148 | 1164 | | |
| |||
0 commit comments