diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2022-09-03 07:15:08 +0100 |
|---|---|---|
| committer | Chris Denton <christophersdenton@gmail.com> | 2022-09-03 07:56:38 +0100 |
| commit | 0fe54d46509abbbe54292d0ff85f8429301be002 (patch) | |
| tree | c6e0178ab173a794ccdc519c0f7956e2fae16796 /library/std/src/sys/windows/path.rs | |
| parent | 8c6ce6b91b172f77c795a74bfeaf74b865146b3f (diff) | |
| download | rust-0fe54d46509abbbe54292d0ff85f8429301be002.tar.gz rust-0fe54d46509abbbe54292d0ff85f8429301be002.zip | |
Restore old behaviour on broken UNC paths
Diffstat (limited to 'library/std/src/sys/windows/path.rs')
| -rw-r--r-- | library/std/src/sys/windows/path.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/library/std/src/sys/windows/path.rs b/library/std/src/sys/windows/path.rs index a0f82207099..beeca1917a9 100644 --- a/library/std/src/sys/windows/path.rs +++ b/library/std/src/sys/windows/path.rs @@ -198,14 +198,7 @@ fn parse_next_component(path: &OsStr, verbatim: bool) -> (&OsStr, &OsStr) { match path.bytes().iter().position(|&x| separator(x)) { Some(separator_start) => { - let mut separator_end = separator_start + 1; - - // a series of multiple separator characters is treated as a single separator, - // except in verbatim paths - while !verbatim && separator_end < path.len() && separator(path.bytes()[separator_end]) - { - separator_end += 1; - } + let separator_end = separator_start + 1; let component = &path.bytes()[..separator_start]; |
