Copy reports which files failed, not just how many #7
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
wokoman/ironpod#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
When a copy finishes with failures, both the command line and the browser can say which files failed and why — not just how many.
Today the browser reports "5 failed" and nothing more. The information exists at the moment each file fails, and is then thrown away: the per-file callback receives the outcome borrowed, so no caller can keep an error even if it wants to. The browser does not try; it counts the failure and drops the reason. For a copy of several hundred files off a network share, "5 failed" is not an answer anyone can act on.
The counting rules have the same problem in a quieter way. Both callers rebuild the same accumulator by hand — copied, duplicates, untitled, failed — and both restate the same rule about when to suggest installing ffmpeg. Two hand-built copies of one set of rules is how they drift.
The fix is to let the copy module return the summary it already computes, instead of making each caller reconstruct it from a stream of events. The progress callback stays, but narrows to what genuinely needs to be a callback: telling the caller where the run has got to so it can repaint.
Acceptance criteria
cargo clippy --all-targetsclean; full suite passesNotes
Surfacing failures in the browser needs somewhere to put them. The existing message viewer — the popup behind
wthat shows what libgpod complained about — is the obvious home, and reusing it is preferable to inventing a second list. Confirm before building anything new for this.Blocked by