1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 01:37:20 +00:00

xattr: only skip file on BufferTooSmallError

redefine __str__ to get a proper error message, not ''
This commit is contained in:
Marian Beermann 2017-01-03 14:25:55 +01:00
parent 85e79f96a1
commit 3e04fa972a
2 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,7 @@
from ctypes.util import find_library from ctypes.util import find_library
from distutils.version import LooseVersion from distutils.version import LooseVersion
from .helpers import Buffer from .helpers import Buffer, Error
try: try:
@ -113,8 +113,11 @@ def split_lstring(buf):
return result return result
class BufferTooSmallError(Exception): class BufferTooSmallError(OSError):
"""the buffer given to an xattr function was too small for the result""" """insufficient buffer memory for completing a xattr operation."""
def __str__(self):
return self.__doc__
def _check(rv, path=None, detect_buffer_too_small=False): def _check(rv, path=None, detect_buffer_too_small=False):

View file

@ -132,6 +132,7 @@ Version 1.0.10rc1 (not released yet)
Bug fixes: Bug fixes:
- Avoid triggering an ObjectiveFS bug in xattr retrieval, #1992 - Avoid triggering an ObjectiveFS bug in xattr retrieval, #1992
- When running out of buffer memory when reading xattrs, only skip the current file, #1993
Version 1.0.9 (2016-12-20) Version 1.0.9 (2016-12-20)
-------------------------- --------------------------