Skip to content

Commit

Permalink
ls: fix panic when file removed too quickly
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Oct 7, 2023
1 parent 91c8724 commit 08542b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,9 @@ fn classify_file(path: &PathData, out: &mut BufWriter<Stdout>) -> Option<char> {
Some('=')
} else if file_type.is_fifo() {
Some('|')
} else if file_type.is_file() && file_is_executable(path.md(out).as_ref().unwrap()) {
} else if file_type.is_file()
&& path.md(out).map(file_is_executable).unwrap_or_default()
{
Some('*')
} else {
None
Expand Down

0 comments on commit 08542b8

Please sign in to comment.