Update src/main.rs
Co-authored-by: andrews05 <andrew@digerati.co.nz>
This commit is contained in:
parent
651a7e3b88
commit
370f3d58c4
1 changed files with 2 additions and 3 deletions
|
|
@ -386,9 +386,8 @@ fn collect_files(
|
||||||
let in_file = if using_stdin {
|
let in_file = if using_stdin {
|
||||||
InFile::StdIn
|
InFile::StdIn
|
||||||
} else {
|
} else {
|
||||||
//skip non png files if recusive flag is used.
|
// Skip non png files if not given on top level
|
||||||
//(still allow the user to convert a non png file if recusive flag is not used);
|
if !top_level && {
|
||||||
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"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue