rust/src/tools/linkchecker
Simon Chopin 3a1ffead36 linkchecker: fix panic on directory symlinks
In Debian and Ubuntu, there are some patches that change the rustc/fonts
directory to a symlink to the system fonts. This triggers a latent bug
in linkchecker, as the DirEntry filetype isn't a dir but later on the
file itself, when opened, is one, triggering an unreachable!() clause.

This patch fixes the situation by using std::fs::metadata, which goes
through symlinks.

I'd have added a test case but `tidy` doesn't seem to like symlinks, and
moreover I'm not sure how Git deals with symlinks on Windows.

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2022-02-11 10:45:59 +01:00
..
tests linkchecker: Fix bug where fragment errors printed the wrong path. 2021-06-09 08:02:14 -07:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00
linkcheck.sh Build linkcheck script as release to run faster. 2021-06-03 14:08:24 -07:00
main.rs linkchecker: fix panic on directory symlinks 2022-02-11 10:45:59 +01:00