remove include-non-png flag

This commit is contained in:
LuckyTurtleDev 2023-09-22 20:36:43 +02:00
parent 449bc40ea7
commit 7ccc385438

View file

@ -70,12 +70,6 @@ fn main() {
.long("recursive") .long("recursive")
.action(ArgAction::SetTrue), .action(ArgAction::SetTrue),
) )
.arg(
Arg::new("include-non-png")
.help("compress also files with non png extensions if --recursive flag is used")
.long("include-non-png")
.action(ArgAction::SetTrue),
)
.arg( .arg(
Arg::new("output_dir") Arg::new("output_dir")
.help("Write output file(s) to <directory>") .help("Write output file(s) to <directory>")
@ -402,7 +396,7 @@ fn collect_files(
} else { } else {
//skip non png files if recusive flag is used. //skip non png files if recusive flag is used.
//(still allow the user to convert a non png file if recusive flag is not used); //(still allow the user to convert a non png file if recusive flag is not used);
if !top_level && recursive && !include_non_png && { if !top_level && recursive && {
let extension = input.extension().map(|f| f.to_ascii_lowercase()); let extension = input.extension().map(|f| f.to_ascii_lowercase());
extension != Some(OsString::from("png")) extension != Some(OsString::from("png"))
&& extension != Some(OsString::from("apng")) && extension != Some(OsString::from("apng"))