Skip to content

Commit

Permalink
fix: crash using --git-repos on unreadable dir
Browse files Browse the repository at this point in the history
Added extra filter to make sure the other `unwrap()` also doesn't make `eza` crash.
  • Loading branch information
erwinvaneijk authored and MartinFillon committed Jan 13, 2024
1 parent 5a2fc5d commit 42396ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>(),
}
Expand Down

0 comments on commit 42396ba

Please sign in to comment.