From 158b854fb73dab7680f9554c2bbde2f821d2630e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 11 Mar 2016 18:27:32 -0800 Subject: [PATCH] linkchecker: Fix path checks on Windows --- src/tools/linkchecker/main.rs | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index e5e88081bc4..19037a2c4d7 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -76,29 +76,28 @@ fn check(root: &Path, file: &Path, base: &Url, errors: &mut bool) { // Unfortunately we're not 100% full of valid links today to we need a few // whitelists to get this past `make check` today. - if let Some(path) = pretty_file.to_str() { - // FIXME(#32129) - if path == "std/string/struct.String.html" { - return - } - // FIXME(#32130) - if path.contains("btree_set/struct.BTreeSet.html") || - path == "collections/struct.BTreeSet.html" { - return - } + // FIXME(#32129) + if file.ends_with("std/string/struct.String.html") { + return + } + // FIXME(#32130) + if file.ends_with("btree_set/struct.BTreeSet.html") || + file.ends_with("collections/struct.BTreeSet.html") { + return + } + + if file.ends_with("std/sys/ext/index.html") { + return + } + + if let Some(file) = file.to_str() { // FIXME(#31948) - if path.contains("ParseFloatError") { + if file.contains("ParseFloatError") { return } - - // currently - if path == "std/sys/ext/index.html" { - return - } - // weird reexports, but this module is on its way out, so chalk it up to // "rustdoc weirdness" and move on from there - if path.contains("scoped_tls") { + if file.contains("scoped_tls") { return } }