1
0
Эх сурвалжийг харах

fix: crash using --git-repos on unreadable dir

Added extra filter to make sure the other `unwrap()` also doesn't make `eza` crash.
Erwin van Eijk 2 жил өмнө
parent
commit
42396ba360
1 өөрчлөгдсөн 1 нэмэгдсэн , 0 устгасан
  1. 1 0
      src/main.rs

+ 1 - 0
src/main.rs

@@ -204,6 +204,7 @@ fn get_files_in_dir(paths: &mut Vec<PathBuf>, path: PathBuf) {
                 vec![path]
             }
             Ok(d) => d
+                .filter(std::result::Result::is_ok)
                 .map(|entry| entry.unwrap().path())
                 .collect::<Vec<PathBuf>>(),
         }