From a984a4a5b762d39e82e5ce60d0e849e31c80e59a Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Sun, 15 Oct 2023 14:57:13 -0600 Subject: [PATCH] fix #571, binarize exclude --- bin/src/modules/binarize.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/src/modules/binarize.rs b/bin/src/modules/binarize.rs index d4fccb04..928e3a3f 100644 --- a/bin/src/modules/binarize.rs +++ b/bin/src/modules/binarize.rs @@ -84,7 +84,13 @@ impl Module for Binarize { .map(|file| glob::Pattern::new(file)) .collect::, glob::PatternError>>()? .iter() - .any(|pat| pat.matches(entry.as_str())) + .any(|pat| { + pat.matches( + entry + .as_str() + .trim_start_matches(&format!("/{}/", addon.folder())), + ) + }) { debug!("skipping binarization of {}", entry.as_str()); continue;