From 2939957c48558afc7530a5fc40695f73a6c75f4e Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 4 Nov 2021 20:02:21 +0530 Subject: fix globs not ignore files correctly --- bin/src/dirs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/src') diff --git a/bin/src/dirs.rs b/bin/src/dirs.rs index d3fe612..682ce97 100644 --- a/bin/src/dirs.rs +++ b/bin/src/dirs.rs @@ -54,7 +54,11 @@ impl Iterator for Walker { if path.is_dir() { self.dirs.push(path); } else if path.is_file() { - self.files.push(path); + if let Match::None | Match::Whitelist(_) = + self.ignore.matched(&path, false) + { + self.files.push(path); + } } } } -- cgit v1.2.3