diff options
author | Nick Coutsos <nick@coutsos.com> | 2013-06-26 01:30:48 -0300 |
---|---|---|
committer | Nick Coutsos <nick@coutsos.com> | 2013-06-26 01:30:48 -0300 |
commit | 13f29e9f66e79eedefeaacf531ab002955514aee (patch) | |
tree | d7d1ab6fffdb533571fcc40d5038fd00581e851c | |
parent | 27d76e442d96139f9038d83d23275877fa3d3c9b (diff) | |
download | fusepy-13f29e9f66e79eedefeaacf531ab002955514aee.tar.gz |
Update the return value of FUSE.listxattr
By adding the extra '\x00' character to an otherwise empty string, fusepy makes it look like a file with no extra attributes has one (nameless?) attribute.
xattr {file} prints one blank line,
and xattr -l {file} prints "xattr: [Errno 22] Invalid argument: '{file}'"
-rw-r--r-- | fuse.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -577,7 +577,9 @@ class FUSE(object): def listxattr(self, path, namebuf, size): attrs = self.operations('listxattr', path.decode(self.encoding)) or '' - ret = '\x00'.join(attrs).encode(self.encoding) + '\x00' + ret = '\x00'.join(attrs).encode(self.encoding) + if len(ret) > 0: + ret += '\x00' retsize = len(ret) # allow size queries |