aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/xattr.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-05-01 23:30:53 +0200
committerJakob Unterwurzacher2018-05-01 23:30:53 +0200
commitfe3890688a693fbfa900e32b05e10861fa4167ba (patch)
treeef006459eee4f7a0d0eb6f0231ddad32cc3bad43 /internal/fusefrontend/xattr.go
parent996d2f141b2c4f0cb9b8fbf66d06a2fb6e8cbaef (diff)
fusefrontend: xattr: return ENOSYS on unsupported flags
We previously returned EPERM to prevent the kernel from blacklisting our xattr support once we get an unsupported flag, but this causes lots of trouble on MacOS: Cannot save files from GUI apps, see https://github.com/rfjakob/gocryptfs/issues/229 Returning ENOSYS triggers the dotfiles fallback on MacOS and fixes the issue.
Diffstat (limited to 'internal/fusefrontend/xattr.go')
-rw-r--r--internal/fusefrontend/xattr.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index f3e7532..36ab4d5 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -55,7 +55,8 @@ func (fs *FS) SetXAttr(path string, attr string, data []byte, flags int, context
return fuse.EPERM
}
if flags != 0 {
- return fuse.EPERM
+ // Drop this once https://github.com/pkg/xattr/pull/26 is merged
+ return fuse.ENOSYS
}
if disallowedXAttrName(attr) {
return fuse.EPERM