We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 522349b commit ce54ba2Copy full SHA for ce54ba2
src/quirks.rs
@@ -236,10 +236,10 @@ pub fn set_pathname(url: &mut Url, new_pathname: &str) {
236
if url.cannot_be_a_base() {
237
return;
238
}
239
- if !SchemeType::from(url.scheme()).is_special()
240
- || Some('/') == new_pathname.chars().nth(0)
241
- // \\ is a segment delimiter for 'special' URLs"
242
- || Some('\\') == new_pathname.chars().nth(0)
+ if Some('/') == new_pathname.chars().nth(0)
+ || SchemeType::from(url.scheme()).is_special()
+ // \ is a segment delimiter for 'special' URLs"
+ && Some('\\') == new_pathname.chars().nth(0)
243
{
244
url.set_path(new_pathname)
245
} else {
0 commit comments