mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 09:59:19 -04:00
dummy xattr implementation for unsupported platforms
raising "Unsupported platform" (and making attic completely unusable) just because there is no xattr support isn't necessary.
This commit is contained in:
parent
6116fa72b2
commit
1fe844a896
1 changed files with 11 additions and 1 deletions
|
|
@ -248,4 +248,14 @@ elif sys.platform.startswith('freebsd'):
|
|||
_check(func(path, EXTATTR_NAMESPACE_USER, name, value, len(value) if value else 0), path)
|
||||
|
||||
else:
|
||||
raise Exception('Unsupported platform: %s' % sys.platform)
|
||||
# this is a dummy xattr interface for platforms for which we do not have
|
||||
# a real implementation (or which do not support xattr at all).
|
||||
|
||||
def listxattr(path, *, follow_symlinks=True):
|
||||
return []
|
||||
|
||||
def getxattr(path, name, *, follow_symlinks=True):
|
||||
return
|
||||
|
||||
def setxattr(path, name, value, *, follow_symlinks=True):
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue