Skip to content

Commit

Permalink
Merge pull request #8452 from jcsp/wip-15266
Browse files Browse the repository at this point in the history
pybind: fix unicode handling in CephFSVolumeClient::purge

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
John Spray committed May 16, 2016
2 parents e93c7b0 + e590f4d commit 7d5ca75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pybind/ceph_volume_client.py
Expand Up @@ -526,7 +526,10 @@ def rmtree(root_path):
d = self.fs.readdir(dir_handle)
while d:
if d.d_name not in [".", ".."]:
d_full = os.path.join(root_path, d.d_name)
# Do not use os.path.join because it is sensitive
# to string encoding, we just pass through dnames
# as byte arrays
d_full = "{0}/{1}".format(root_path, d.d_name)
if d.is_dir():
rmtree(d_full)
else:
Expand Down

0 comments on commit 7d5ca75

Please sign in to comment.