Repository navigation
move: log an original that cannot be removed after a verified copy - #501
Merged
125hz merged 1 commit intoNov 2, 2026
Merged
Conversation
copyVerifyDelete deletes the source with try?, so a read-only or busy source stayed behind with no trace while the library entry moved to the new place. Log the failure so the leftover is explainable from the log. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: 过冬呢 <guodong@MacBook-Pro-4.local>
125hz
pushed a commit
that referenced
this pull request
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GameMover.copyVerifyDeleteremoves the source withtry?after the copy has been checked. If a source file cannot be removed (read-only or busy), the library entry still moves to the new place, the original stays on the old drive, and nothing in the log says so. The user only sees that the old drive did not get its space back.This logs each removal that fails:
[move] copied, but the original <name> could not be removed: <reason>. The move itself still succeeds, since the copy is already verified, so there is no behavior change otherwise.Testing:
swiftc -parse app/Madeira/ExternalDrives.swiftpasses. I did not run the app or the move flow on a device, and no host test coversGameMover, so I added no test. CI will show the build.AI-assisted: written and reviewed with Claude Code.
🤖 Generated with Claude Code