aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 2 insertions, 3 deletions
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<String>, 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()),