From 482290c40763796f530ebe0812bacf905af194fc Mon Sep 17 00:00:00 2001 From: Qrius Date: Tue, 12 Nov 2024 12:36:35 +0100 Subject: Fix some typos --- src/skaldpress/main.rs | 5 +---- src/skaldpress/parseopts.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/skaldpress/main.rs b/src/skaldpress/main.rs index 9ab988e..909f139 100644 --- a/src/skaldpress/main.rs +++ b/src/skaldpress/main.rs @@ -520,7 +520,7 @@ fn file_filtered(file: &String, filters: &Vec, exclude: &Vec) -> } for filter in filters { if file_pat_match(file, filter) { - return true; + return false; } } true @@ -559,9 +559,6 @@ fn compile_files_in_directory(directory: &Path, opts: &Opts) -> Result<(), Skald } } - //let should_compile = (opts.first_run || needs_recompilation) - // && ((opts.filter.len() == 0) - // || !file_filtered(&path.as_path().to_str().unwrap_or("").to_string(), &opts.filter)); let should_compile = (opts.first_run || needs_recompilation) && !file_filtered( &path.as_path().to_str().unwrap_or("").to_string(), diff --git a/src/skaldpress/parseopts.rs b/src/skaldpress/parseopts.rs index ec32bfd..a0944a8 100644 --- a/src/skaldpress/parseopts.rs +++ b/src/skaldpress/parseopts.rs @@ -154,7 +154,7 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option, progna println!("Missing value for {}\n", arg); parseopts_panic!(progname); }; - opts.exclude = compilefilter.split(",").map(|x| x.to_string()).collect(); + opts.compilefilter = compilefilter.split(",").map(|x| x.to_string()).collect(); } "m" | "metadata" => { let Some(meta) = value else { -- cgit v1.2.3