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

Added extra filter to make sure the other `unwrap()` also doesn't make `eza` crash.
This commit is contained in:
Erwin van Eijk 2024-01-13 10:58:13 +01:00 committed by MartinFillon
parent 5a2fc5d360
commit 42396ba360

View file

@ -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>>(),
}