diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-03-11 18:27:32 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-03-14 14:56:49 -0700 |
| commit | 158b854fb73dab7680f9554c2bbde2f821d2630e (patch) | |
| tree | 1be86b4a0f11a56c35eb8e28549b5348a13aa3b2 | |
| parent | 8cd1c17d90c616a530a6e2aed559b3efecb3c2e0 (diff) | |
| download | rust-158b854fb73dab7680f9554c2bbde2f821d2630e.tar.gz rust-158b854fb73dab7680f9554c2bbde2f821d2630e.zip | |
linkchecker: Fix path checks on Windows
| -rw-r--r-- | src/tools/linkchecker/main.rs | 35 |
1 files 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(#31948) - if path.contains("ParseFloatError") { - 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 + } - // currently - if path == "std/sys/ext/index.html" { + if let Some(file) = file.to_str() { + // FIXME(#31948) + if file.contains("ParseFloatError") { 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 } } |
