Skip to content

move: log an original that cannot be removed after a verified copy - #501

Merged
125hz merged 1 commit into
willfaust:mainfrom
Jelly-RayTian:fix/move-report-undeleted-original
Nov 2, 2026
Merged

125hz merged 1 commit into
willfaust:mainfrom
Jelly-RayTian:fix/move-report-undeleted-original

Conversation

@Jelly-RayTian

Copy link
Copy Markdown
Contributor

GameMover.copyVerifyDelete removes the source with try? 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.swift passes. I did not run the app or the move flow on a device, and no host test covers GameMover, so I added no test. CI will show the build.

AI-assisted: written and reviewed with Claude Code.

🤖 Generated with Claude Code

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
125hz merged commit c327992 into willfaust:main Nov 2, 2026
13 checks passed
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.

2 participants