copy-app/copy-fuse — pull request #4 by aitjcize (2013-06-06 18:12:37+00:00)
Title: Fix encode error when dealing with unicode filename

For example, when having Chinese filename in my copy directory resulting the following error:
listing objects from cloud for path: /backup/AllBackup/auto_backup
Traceback (most recent call last):
File "/home/aitjcize/Work/uwfs/python/lib/python2.7/site-packages/fuse.py", line 414, in _wrapper
return func(*args, **kwargs) or 0
File "/home/aitjcize/Work/uwfs/python/lib/python2.7/site-packages/fuse.py", line 422, in getattr
return self.fgetattr(path, buf, None)
File "/home/aitjcize/Work/uwfs/python/lib/python2.7/site-packages/fuse.py", line 668, in fgetattr
attrs = self.operations('getattr', path.decode(self.encoding), fh)
File "/home/aitjcize/Work/uwfs/python/lib/python2.7/site-packages/fuse.py", line 881, in __call__
ret = getattr(self, op)(path, *args)
File "copyfuse.py", line 232, in getattr
objects = self.copy_api.list_objects(os.path.dirname(path))
File "copyfuse.py", line 90, in list_objects
name = str(os.path.basename(child['path']))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-7: ordinal not in range(128)