Only pop drive letters at the start of a path - #1149
Open
konstin wants to merge 2 commits into
Open
Conversation
Disclosure: I found this with automated scanning for crashes in uv. It's one line fix (plus comments and tests), so I'm putting it up anyway. Currently, in `file:///a/c:` the `c:` is erroneously considered a windows drive letter that we have to retain, so `file:///a/c:` remains instead of becoming `file:///a/`, subsequently failing the debug assertion at https://github.com/servo/rust-url/blob/00a6ce58d02f4e0d43c5ca0702c0bedb8b1ebf3a/url/src/parser.rs#L1301. The additional check ensure that only `file:///c:` can be a path.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1149 +/- ##
=======================================
Coverage ? 86.97%
=======================================
Files ? 26
Lines ? 5273
Branches ? 0
=======================================
Hits ? 4586
Misses ? 687
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Disclosure: I found this with automated scanning for crashes in uv. It's one line fix (plus comments and tests), so I'm putting it up anyway.
Currently, in
file:///a/c:thec:is erroneously considered a windows drive letter that we have to retain, sofile:///a/c:remains instead of becomingfile:///a/, subsequently failing the debug assertion atrust-url/url/src/parser.rs
Line 1301 in 00a6ce5
The additional check ensure that only
file:///c:can be a path.