diff options
author | Terence Daniel Honles <terence@honles.com> | 2012-08-18 00:40:40 -0700 |
---|---|---|
committer | Terence Daniel Honles <terence@honles.com> | 2012-08-18 00:40:40 -0700 |
commit | 42d8122bf3cb8e42085442fd8b54f0d0330d74aa (patch) | |
tree | 326cf19ec6ff4a2438a3bde8c11ec569d173cb22 | |
parent | 149570954f850e50e45710345d56e737c057224f (diff) | |
download | fusepy-42d8122bf3cb8e42085442fd8b54f0d0330d74aa.tar.gz |
fixing encoding bugs
- adding missing path decoding for readlink
- removing encoding for xattr data
(arbitrary binary data should be allowed)
-rw-r--r-- | fuse.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -410,7 +410,8 @@ class FUSE(object): return self.fgetattr(path, buf, None) def readlink(self, path, buf, bufsize): - ret = self.operations('readlink', path).encode(self.encoding) + ret = self.operations('readlink', path.decode(self.encoding)) \ + .encode(self.encoding) # copies a string into the given buffer # (null terminated and truncated if necessary) @@ -532,15 +533,13 @@ class FUSE(object): fh) def setxattr(self, path, name, value, size, options, *args): - data = string_at(value, size) return self.operations('setxattr', path.decode(self.encoding), name.decode(self.encoding), - data.decode(self.encoding), options, *args) + string_at(value, size), options, *args) def getxattr(self, path, name, value, size, *args): ret = self.operations('getxattr', path.decode(self.encoding), - name.decode(self.encoding), *args) \ - .encode(self.encoding) + name.decode(self.encoding), *args) retsize = len(ret) # allow size queries |