From 4d7b0f357a4fd42e04488a43f65f822e236c989e Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 7 Jul 2016 03:38:21 +0200 Subject: [PATCH] fuse: getxattr fail must use errno.ENOATTR, fixes #1126 The problem was that OS X Finder queried some OS X specific xattrs and if they were not present, the wrong errno (ENODATA) was included in the raised FUSEError exception. According to the llfuse docs, the errno must be ENOATTR for this case. Obviously, Finder didn't handle this well and denied access to the file. Also, file size was displayed as "zero bytes" although we return the correct value. --- borg/fuse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg/fuse.py b/borg/fuse.py index 74f6104f9..cc20511a3 100644 --- a/borg/fuse.py +++ b/borg/fuse.py @@ -194,7 +194,7 @@ class FuseOperations(llfuse.Operations): try: return item.get(b'xattrs', {})[name] except KeyError: - raise llfuse.FUSEError(errno.ENODATA) from None + raise llfuse.FUSEError(errno.ENOATTR) from None def _load_pending_archive(self, inode): # Check if this is an archive we need to load