Skip to content

Commit

Permalink
fusefrontend: xattr: return ENOSYS on unsupported flags
Browse files Browse the repository at this point in the history
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
#229

Returning ENOSYS triggers the dotfiles fallback on MacOS
and fixes the issue.
  • Loading branch information
rfjakob committed May 1, 2018
1 parent 996d2f1 commit fe38906
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/fusefrontend/xattr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe38906

Please sign in to comment.