mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-09 08:51:54 -04:00
Fix xattr issue on OS X.
This commit is contained in:
parent
a51a10a96c
commit
7815ed5885
2 changed files with 7 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ class ArchiverTestCase(AtticTestCase):
|
|||
name = sorted(os.listdir(os.path.join(self.tmpdir, 'repository', 'data', '0')), reverse=True)[0]
|
||||
fd = open(os.path.join(self.tmpdir, 'repository', 'data', '0', name), 'r+')
|
||||
fd.seek(100)
|
||||
fd.write('X')
|
||||
fd.write('XXXX')
|
||||
fd.close()
|
||||
self.attic('verify', self.repository_location + '::test', exit_code=1)
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,12 @@ except ImportError:
|
|||
func = libc.flistxattr
|
||||
elif not follow_symlinks:
|
||||
flags = XATTR_NOFOLLOW
|
||||
n = _check(func(path, None, 0, flags), path)
|
||||
try:
|
||||
n = _check(func(path, None, 0, flags), path)
|
||||
except OSError as e:
|
||||
if e.errno == errno.EPERM:
|
||||
return []
|
||||
raise
|
||||
if n == 0:
|
||||
return []
|
||||
namebuf = create_string_buffer(n)
|
||||
|
|
|
|||
Loading…
Reference in a new issue