@@ -349,12 +349,9 @@ class Archive(object):
}
if self.numeric_owner:
item[b'user'] = item[b'group'] = None
- try:
- xattrs = xattr.get_all(path, follow_symlinks=False)
- if xattrs:
- item[b'xattrs'] = xattrs
- except PermissionError:
- pass
+ xattrs = xattr.get_all(path, follow_symlinks=False)
+ if xattrs:
+ item[b'xattrs'] = xattrs
return item
def process_item(self, path, st):
@@ -12,7 +12,7 @@ from attic.xattr import get_all
if 'HAVE_FUTIMENS' in getattr(posix, '_have_functions', []):
st_mtime_ns_round = 0
elif 'HAVE_UTIMES' in sysconfig.get_config_vars():
- st_mtime_ns_round = -4
+ st_mtime_ns_round = -6
else:
st_mtime_ns_round = -9
@@ -211,8 +211,12 @@ except ImportError:
names = []
mv = memoryview(namebuf.raw)
while mv:
- names.append(os.fsdecode(bytes(mv[1:1+mv[0]])))
- mv = mv[1+mv[0]:]
+ length = mv[0]
+ # Python < 3.3 returns bytes instead of int
+ if isinstance(length, bytes):
+ length = ord(length)
+ names.append(os.fsdecode(bytes(mv[1:1+length])))
+ mv = mv[1+length:]
return names
def getxattr(path, name, *, follow_symlinks=True):