From 3daa2bf7ff02d633fb1f0729a0046b5469fe39fe Mon Sep 17 00:00:00 2001 From: DeKe42 <31103037+DeKe42@users.noreply.github.com> Date: Thu, 21 Jun 2018 22:07:26 +0200 Subject: [PATCH] Do not urldecode Key from list_objects response (#670) Also don't urldecode dir name Fixes #669 --- minio/parsers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minio/parsers.py b/minio/parsers.py index 8bd23f37a..5b131ebde 100644 --- a/minio/parsers.py +++ b/minio/parsers.py @@ -197,7 +197,7 @@ def _parse_objects_from_xml_elts(bucket_name, contents, common_prefixes): """ objects = [ Object(bucket_name, - content.get_urldecoded_elem_text('Key'), + content.get_child_text('Key'), content.get_localized_time_elem('LastModified'), content.get_etag_elem(strict=False), content.get_int_elem('Size')) @@ -205,7 +205,7 @@ def _parse_objects_from_xml_elts(bucket_name, contents, common_prefixes): ] object_dirs = [ - Object(bucket_name, urldecode(dir_elt.text()), None, '', + Object(bucket_name, dir_elt.text(), None, '', 0, is_dir=True) for dirs_elt in common_prefixes for dir_elt in dirs_elt.findall('Prefix')