From 370f3d58c40db57c0199f22c78fdabd74e3dbfb9 Mon Sep 17 00:00:00 2001 From: LuckyTurtleDev Date: Sat, 23 Sep 2023 09:40:42 +0200 Subject: [PATCH] Update src/main.rs Co-authored-by: andrews05 --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index b667dddc..8270203f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -386,9 +386,8 @@ fn collect_files( let in_file = if using_stdin { InFile::StdIn } else { - //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); - if !top_level && recursive && { + // Skip non png files if not given on top level + if !top_level && { let extension = input.extension().map(|f| f.to_ascii_lowercase()); extension != Some(OsString::from("png")) && extension != Some(OsString::from("apng"))