Ogg, xtask: check packet ranges against the source first; stats skips directory links (#1796)

This commit is contained in:
Dylan M. Taylor
2026-11-04 13:56:48 -05:00
committed by GitHub
parent 23ac4f7efd
commit 51d19baa0c
3 changed files with 22 additions and 1 deletions
+7 -1
View File
@@ -18,7 +18,13 @@ fn walk(dir: &Path, c: &mut Counts) {
let p = e.path();
let name = e.file_name();
let name = name.to_string_lossy();
if p.is_dir() {
// `file_type` does not follow links, so a directory link is not walked (and aliases are
// not counted twice).
let Ok(kind) = e.file_type() else { continue };
if kind.is_symlink() {
continue;
}
if kind.is_dir() {
// Nested fuzz workspaces and build output are not part of the crate.
if name != "target" && name != "fuzz" && !name.starts_with('.') {
walk(&p, c);