From 6ad1ad67d55b92feb17783853bd419bceb16b37a 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 196d8bd82..951775b6b 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -287,7 +287,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