mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-21 06:07:18 -04:00
require and use chown with follow_symlinks=False
should be equivalent to using os.lchown() before.
(cherry picked from commit 094376a8ad)
This commit is contained in:
parent
8857422035
commit
2b3932cac6
2 changed files with 2 additions and 2 deletions
|
|
@ -472,7 +472,7 @@ Number of files: {0.stats.nfiles}'''.format(
|
|||
if fd:
|
||||
os.fchown(fd, uid, gid)
|
||||
else:
|
||||
os.lchown(path, uid, gid)
|
||||
os.chown(path, uid, gid, follow_symlinks=False)
|
||||
except OSError:
|
||||
pass
|
||||
if fd:
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class PythonLibcTooOld(Error):
|
|||
|
||||
|
||||
def check_python():
|
||||
required_funcs = {os.stat, os.utime}
|
||||
required_funcs = {os.stat, os.utime, os.chown}
|
||||
if not os.supports_follow_symlinks.issuperset(required_funcs):
|
||||
raise PythonLibcTooOld
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue