Skip to content

Commit

Permalink
reinstate comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.eades authored and danieleades committed Jan 20, 2025
1 parent d48b347 commit 5ff8cce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/uucore/src/lib/features/fsxattr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ pub fn apply_xattrs<P: AsRef<Path>>(
/// `true` if the file has extended attributes (indicating an ACL), `false` otherwise.
pub fn has_acl<P: AsRef<Path>>(file: P) -> bool {
// don't use exacl here, it is doing more getxattr call then needed
xattr::list(file).is_ok_and(|acl| acl.count() > 0)
xattr::list(file).is_ok_and(|acl| {
// if we have extra attributes, we have an acl
acl.count() > 0
})
}

/// Returns the permissions bits of a file or directory which has Access Control List (ACL) entries based on its
Expand Down

0 comments on commit 5ff8cce

Please sign in to comment.