Conversation
Before this, a folder with a symlink in it stopped extracting on Windows at the first link. Names ordinary on Linux and macOS were worse. `notes.txt:hidden` would have become an NTFS stream on `notes.txt`, `CON` a device, `report.` a file quietly named `report`, and `a<b` an error that ended the extraction. Names are rewritten, not refused, because most of them come from honest senders: `10:30 standup.md` is a normal name on a Mac. Each character Windows would interpret becomes `_`, trailing dots and spaces become `_`, and a device name gets `_` after its stem. A rewrite never introduces a separator, so it cannot move an entry to another directory. The existence and link checks run on the rewritten path, and every rename is reported. Archive paths are now split on `/` by hand rather than handed to `Path`, which reads `C:x` as a drive on Windows and as a name elsewhere, so every platform judges the same components. A name the filesystem refuses, or a link the system cannot create, now skips that entry with a warning instead of ending the extraction. A full disk or a permission problem still ends it. Pinned without Windows by a 300-byte name; with the old behaviour restored, that test fails. Cross-platform plan, phase 1. The Windows-only tests run in CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Sep 14, 2026
The first Windows run of the naming tests showed that storing `C:x` as sent there is refused: PathBuf::push treats it as drive-relative and replaces the destination, and the final inside-the-destination check catches that. Names are never stored as sent on Windows, so the refusal is the correct outcome and the test now asserts it, pinning the safety check that found it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
This branch has not been deployed
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.
Cross-platform plan, phase 1. Behaviour change, waiting for your review. Stacked on #69.
Problems this fixes (found by reading the code; Windows had never run it)
node_modules/.bin, virtualenvs).notes.txt:hiddennotes.txtnotes.txt_hiddenmine.txt::$DATAmine.txt's main streammine.txt__$DATACON,nul.txtCON_,nul_.txtreport./notesreport_/notes_C:xC_x10:30 standup.md(from a Mac)10_30 standup.mdDesign
/by hand instead of going throughPath, so every OS judges the same components. A backslash inside a component is refused everywhere.InvalidFilename/InvalidInput), or when a symlink can't be created. A full disk or a permission problem still aborts.--force, trying would delete the existing file before failing to create the link.cli/src/names.rs: pure functions tested on every OS. The single-file receive path uses it too (report:v2.pdfis saved asreport_v2.pdf, and the receiver is told).Tests (210 total, up from 193)
fmt,clippy -D warnings,cargo test --workspace --all-targetsandcheck-secrets.shall pass locally (Linux).🤖 Generated with Claude Code
https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S