mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-12 10:20:08 -04:00
Ignore xattr errors during extract if not supported by the filesystem
Closes #46.
This commit is contained in:
parent
6425d16aa8
commit
88ff981eee
2 changed files with 8 additions and 3 deletions
1
CHANGES
1
CHANGES
|
|
@ -16,6 +16,7 @@ Version 0.11
|
|||
- "attic verify" has been deprecated. Use "attic extract --dry-run" instead.
|
||||
- "attic prune --hourly|daily|..." has been deprecated.
|
||||
Use "attic prune --keep-hourly|daily|..." instead.
|
||||
- Ignore xattr errors during "extract" if not supported by the filesystem. (#46)
|
||||
|
||||
Version 0.10
|
||||
------------
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from binascii import hexlify
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from getpass import getuser
|
||||
from itertools import groupby
|
||||
import errno
|
||||
import shutil
|
||||
import tempfile
|
||||
from attic.key import key_factory
|
||||
|
|
@ -283,8 +283,12 @@ class Archive:
|
|||
def restore_attrs(self, path, item, symlink=False, fd=None):
|
||||
xattrs = item.get(b'xattrs')
|
||||
if xattrs:
|
||||
for k, v in xattrs.items():
|
||||
xattr.setxattr(fd or path, k, v)
|
||||
for k, v in xattrs.items():
|
||||
try:
|
||||
xattr.setxattr(fd or path, k, v)
|
||||
except OSError as e:
|
||||
if e.errno != errno.ENOTSUP:
|
||||
raise
|
||||
uid = gid = None
|
||||
if not self.numeric_owner:
|
||||
uid = user2uid(item[b'user'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue