We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a835f9 commit e0559e3Copy full SHA for e0559e3
src/uu/ls/src/ls.rs
@@ -3418,10 +3418,7 @@ fn get_security_context<'a>(
3418
// For SMACK, use the path to get the label
3419
// If must_dereference is true, we follow the symlink
3420
let target_path = if must_dereference {
3421
- match std::fs::canonicalize(path) {
3422
- Ok(p) => p,
3423
- Err(_) => path.to_path_buf(),
3424
- }
+ std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf())
3425
} else {
3426
path.to_path_buf()
3427
};
0 commit comments