We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 90b3f6b + e1b7f25 commit c53ca6dCopy full SHA for c53ca6d
src/uu/ls/src/ls.rs
@@ -2889,7 +2889,11 @@ fn classify_file(path: &PathData, out: &mut BufWriter<Stdout>) -> Option<char> {
2889
Some('=')
2890
} else if file_type.is_fifo() {
2891
Some('|')
2892
- } else if file_type.is_file() && file_is_executable(path.md(out).as_ref().unwrap()) {
+ } else if file_type.is_file()
2893
+ // Safe unwrapping if the file was removed between listing and display
2894
+ // See https://github.com/uutils/coreutils/issues/5371
2895
+ && path.md(out).map(file_is_executable).unwrap_or_default()
2896
+ {
2897
Some('*')
2898
} else {
2899
None
0 commit comments