From 47e291eec187e66363ac0f3647b1623e99d540fe Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 10 Mar 2024 13:11:10 +0100 Subject: [PATCH] FreeBSD: simplify numeric_ids check --- src/borg/platform/freebsd.pyx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/borg/platform/freebsd.pyx b/src/borg/platform/freebsd.pyx index bd19dc1c9..3742d3637 100644 --- a/src/borg/platform/freebsd.pyx +++ b/src/borg/platform/freebsd.pyx @@ -171,10 +171,11 @@ cdef _set_acl(p, type, item, attribute, numeric_ids=False, fd=None): cdef acl_t acl text = item.get(attribute) if text: - if numeric_ids and type == ACL_TYPE_NFS4: - text = _nfs4_use_stored_uid_gid(text) - elif numeric_ids and type in(ACL_TYPE_ACCESS, ACL_TYPE_DEFAULT): - text = posix_acl_use_stored_uid_gid(text) + if numeric_ids: + if type == ACL_TYPE_NFS4: + text = _nfs4_use_stored_uid_gid(text) + elif type in (ACL_TYPE_ACCESS, ACL_TYPE_DEFAULT): + text = posix_acl_use_stored_uid_gid(text) acl = acl_from_text(text) if acl == NULL: raise OSError(errno.errno, os.strerror(errno.errno), os.fsdecode(p))