Conversation
|
Nice! Can you enable the test in https://github.com/rfjakob/gocryptfs/blob/master/tests/reverse/xattr_test.go ? |
411b4f9 to
f2de17e
Compare
Done. I'm not sure if a notification is sent to the email when updating the sources. |
| // Caller passes size zero to find out how large their buffer should be | ||
| if len(dest) == 0 { | ||
| return uint32(len(data)), 0 | ||
| } |
There was a problem hiding this comment.
The behavior of the function is described in:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fs/api.go#L312
It doesn't make sense, since the following condition will give the same result:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fuse/opcode.go#L285
| var errno syscall.Errno | ||
| data, errno = n.getXAttr(attr) | ||
| if errno != 0 { | ||
| return minus1, errno |
There was a problem hiding this comment.
Why not -1 like https://man7.org/linux/man-pages/man2/getxattr.2.html#RETURN_VALUE says?
There was a problem hiding this comment.
The behavior of the function is described in:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fs/api.go#L312
Returning -1 does not make sense, since it is ignored on errors:
https://github.com/hanwen/go-fuse/blob/756578b6a0b03511fde147b2f23c5b97217ede27/fuse/opcode.go#L294
|
Merged as ed1c5e4 , thanks! |
Fixes #827