Skip to content

Commit 158b854

Browse files
committed
linkchecker: Fix path checks on Windows
1 parent 8cd1c17 commit 158b854

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/tools/linkchecker/main.rs

+17-18
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,28 @@ fn check(root: &Path, file: &Path, base: &Url, errors: &mut bool) {
7676

7777
// Unfortunately we're not 100% full of valid links today to we need a few
7878
// whitelists to get this past `make check` today.
79-
if let Some(path) = pretty_file.to_str() {
80-
// FIXME(#32129)
81-
if path == "std/string/struct.String.html" {
82-
return
83-
}
84-
// FIXME(#32130)
85-
if path.contains("btree_set/struct.BTreeSet.html") ||
86-
path == "collections/struct.BTreeSet.html" {
87-
return
88-
}
89-
// FIXME(#31948)
90-
if path.contains("ParseFloatError") {
91-
return
92-
}
79+
// FIXME(#32129)
80+
if file.ends_with("std/string/struct.String.html") {
81+
return
82+
}
83+
// FIXME(#32130)
84+
if file.ends_with("btree_set/struct.BTreeSet.html") ||
85+
file.ends_with("collections/struct.BTreeSet.html") {
86+
return
87+
}
88+
89+
if file.ends_with("std/sys/ext/index.html") {
90+
return
91+
}
9392

94-
// currently
95-
if path == "std/sys/ext/index.html" {
93+
if let Some(file) = file.to_str() {
94+
// FIXME(#31948)
95+
if file.contains("ParseFloatError") {
9696
return
9797
}
98-
9998
// weird reexports, but this module is on its way out, so chalk it up to
10099
// "rustdoc weirdness" and move on from there
101-
if path.contains("scoped_tls") {
100+
if file.contains("scoped_tls") {
102101
return
103102
}
104103
}

0 commit comments

Comments
 (0)