Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
| break; | ||
| } | ||
| _ => path = dir.join(format!("{n}-{name}")), | ||
| Err(e) => return Err(format!("{}: {e}; no photo was brought back", path.display())), |
There was a problem hiding this comment.
Nit (documentation, not a bug): the fix is correct. Any metadata error other than NotFound now refuses the package before any edit. The doc comment on bring_back (around lines 435-441) still describes only the "taken by other bytes" case, so it doesn't mention this refusal. Suggest one sentence there, e.g. "A folder that can't be used (a file is in its place, say) refuses the whole package before any edit is made, and says which path." Note this refuses the whole package for one photo whose path fails, rather than leaving that photo out and counting it as the non-plain-name case does. That is consistent with "unusable results are errors", so I'm not asking for a change, just making the choice visible.
Code reviewBugs: None found. The fix is correct. The candidate-name loop in Security: None found. The diff adds no new input handling beyond the existing Performance: None found. The change only affects the error path. Quality:
AGENTS.md: Compliant. The diff adds no Not verified: The PR says the targeted test was still compiling and the full CI had not run when submitted. I could not compile or run it here, so the test passing and failing on the old code is unconfirmed. Session being Earlier concerns: There were no prior review threads, so I left none alone. Change sizeCompared with main (merge base ce40749 to PR head 9163762).
|
|
Superseded by the combined engine correctness PR #2201. |
Summary
Bring Back now refuses a photo destination whose metadata cannot be read, before applying edits or writing photos. Previously, a file named
<area> photoswhere the destination directory should be caused the filename-selection loop to try numbered candidates forever, freezing the command.The regression creates that destination conflict, bounds completion with a channel deadline, and checks that the project and existing file remain unchanged.
Release sweep finding: #2029 (comment)
Testing
git diff --check,cargo fmt --all --checkand direct rustfmt verification.UI evidence
No visible UI change; this fixes the engine's failed-file path.