From 5f7b3c42eabfab1b330a2dd1d6abc77e801f77f6 Mon Sep 17 00:00:00 2001 From: Thomas Zahner Date: Sun, 15 Sep 2024 14:12:38 +0200 Subject: [PATCH] Handle path exclusions when walking directories --- lychee-lib/src/types/input.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lychee-lib/src/types/input.rs b/lychee-lib/src/types/input.rs index bf9bda6..229aca8 100644 --- a/lychee-lib/src/types/input.rs +++ b/lychee-lib/src/types/input.rs @@ -233,6 +233,10 @@ impl Input { for entry in WalkBuilder::new(path).standard_filters(gitignore).hidden(true).build() { let entry = entry?; + if self.is_excluded_path(&entry.path().to_path_buf()) { + continue; + } + match entry.file_type() { None => continue, Some(file_type) => {