Skip to content

Commit

Permalink
ls: fix panic when file removed too quickly
Browse files Browse the repository at this point in the history
Fixes #5371
  • Loading branch information
sanpii committed Oct 7, 2023
1 parent 91c8724 commit 71e91a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,7 @@ fn classify_file(path: &PathData, out: &mut BufWriter<Stdout>) -> Option<char> {
Some('=')

Check failure on line 2888 in src/uu/ls/src/ls.rs

View workflow job for this annotation

GitHub Actions / Style and Lint (macos-12, unix)

ERROR: `cargo fmt`: style violation (file:'src/uu/ls/src/ls.rs', line:2888; use `cargo fmt -- "src/uu/ls/src/ls.rs"`)

Check failure on line 2888 in src/uu/ls/src/ls.rs

View workflow job for this annotation

GitHub Actions / Style/format (ubuntu-latest, feat_os_unix)

ERROR: `cargo fmt`: style violation (file:'src/uu/ls/src/ls.rs', line:2888; use `cargo fmt -- "src/uu/ls/src/ls.rs"`)
} 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 71e91a0

Please sign in to comment.