Linux: acl_set bug fix: always fsencode path

We use path when raising OSErrors, even if we have an fd.
This commit is contained in:
Thomas Waldmann 2024-03-02 20:08:11 +01:00
parent 96cac5f381
commit 4cc4516c59
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
1 changed files with 1 additions and 1 deletions

View File

@ -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