summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerence Daniel Honles <terence@honles.com>2012-08-18 00:40:40 -0700
committerTerence Daniel Honles <terence@honles.com>2012-08-18 00:40:40 -0700
commit42d8122bf3cb8e42085442fd8b54f0d0330d74aa (patch)
tree326cf19ec6ff4a2438a3bde8c11ec569d173cb22
parent149570954f850e50e45710345d56e737c057224f (diff)
downloadfusepy-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.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/fuse.py b/fuse.py
index 84868bb..ac09496 100644
--- a/fuse.py
+++ b/fuse.py
@@ -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