From 5358267771fc7eca23c28e890141666ad23512ed Mon Sep 17 00:00:00 2001 From: Mroik Date: Tue, 24 Jun 2025 18:35:47 +0200 Subject: Include empty directories --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 86c8a23..3be794a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,9 +118,8 @@ fn list_leafs(acc: &mut Vec, path: &str) -> Result<()> { for entry in std::fs::read_dir(path)? { match entry { Ok(e) => { - if !e.file_type().unwrap().is_dir() { - acc.push(format!("{}/{}", path, e.file_name().to_str().unwrap())); - } else { + acc.push(format!("{}/{}", path, e.file_name().to_str().unwrap())); + if e.file_type().unwrap().is_dir() { list_leafs( acc, &format!("{}/{}", path, e.file_name().to_str().unwrap()), -- cgit v1.2.3