From 4cc4516c59401e581ff2870a99629ea5b0c9feea Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 2 Mar 2024 20:08:11 +0100 Subject: [PATCH] Linux: acl_set bug fix: always fsencode path We use path when raising OSErrors, even if we have an fd. --- src/borg/platform/linux.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx index 2f02065f5..64a01ac5d 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -288,7 +288,7 @@ def acl_set(path, item, numeric_ids=False, fd=None): # Linux does not support setting ACLs on symlinks return - if fd is None and isinstance(path, str): + if isinstance(path, str): path = os.fsencode(path) if numeric_ids: converter = posix_acl_use_stored_uid_gid