Repository navigation
Conversation
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.
Windows UNC patterns such as
r"\\*.custom*\*"can panic inglob_withbefore iteration: the reconstructed path adds an implicit root separator, so the computed root length is 14 bytes while the original pattern is only 13 bytes.Compute the root length from the original prefix component and count a root separator only when it is present in the input. This keeps both slices in the original string and removes the normalized-path allocations. UNC server/share wildcard enumeration and the existing unsupported verbatim UNC behavior are unchanged.
Add Windows regressions for the reported pattern, Unicode UNC prefixes, forward slashes, trailing and repeated separators, and unsupported verbatim UNC prefixes. Extend the filesystem integration test with Unicode filenames and drive-rooted, repeated-separator, current-drive-rooted, and verbatim disk patterns.
Fixes #134.
Validation on native Windows (
x86_64-pc-windows-gnu):cargo test --allwithRUSTFLAGS=-DwarningsandRUSTDOCFLAGS=-Dwarnings: 19 unit, 1 integration, and 5 doc tests passed; 2 existing doc examples ignored.cargo fmt -- --checkandgit diff --checkpassed.rustc --edition=2021 --crate-type lib -D warnings; test dependencies were excluded.cargo clippy --all --target x86_64-unknown-linux-gnu -- -Aclippy::while_let_loop. This was a cross-target static check; Linux/macOS runtime tests await CI.match_like_matches_macro,to_string_in_format_args,bind_instead_of_map, anditer_skip_next), in addition to the upstreamwhile_let_loopallowance. No source lint allowances were added.Implementation and tests were prepared with assistance from OpenAI Codex. The validation above was executed locally.