From d11137dd379f9763a14641c513ed0fd8103cd48f Mon Sep 17 00:00:00 2001 From: Abogical Date: Tue, 21 Feb 2017 20:38:44 +0200 Subject: [PATCH] Print a warning for too big extended attributes --- borg/archive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/borg/archive.py b/borg/archive.py index 3916e5622..2274a2778 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -501,7 +501,10 @@ Number of files: {0.stats.nfiles}'''.format( try: xattr.setxattr(fd or path, k, v, follow_symlinks=False) except OSError as e: - if e.errno not in (errno.ENOTSUP, errno.EACCES): + if e.errno == errno.E2BIG: + logger.warning('%s: Value or key of extended attribute %s is too big for this filesystem' % + (path, k.decode())) + elif e.errno not in (errno.ENOTSUP, errno.EACCES): # only raise if the errno is not on our ignore list: # ENOTSUP == xattrs not supported here # EACCES == permission denied to set this specific xattr