Skip to content

Commit 07389e8

Browse files
committed
remove unquote
1 parent 854abac commit 07389e8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

hsclient/hydroshare.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from posixpath import basename, dirname, join as urljoin, splitext
1515
from pprint import pformat
1616
from typing import Callable, Dict, List, TYPE_CHECKING, Union
17-
from urllib.parse import unquote, urlparse
17+
from urllib.parse import urlparse
1818
from uuid import uuid4
1919
from zipfile import ZipFile
2020

@@ -173,12 +173,8 @@ def _files(self):
173173
if not file.path == self.metadata_path:
174174
if not str(file.path).endswith('/'): # checking for folders, shouldn't have to do this
175175
file_checksum_path = file.path.split(self._resource_path, 1)[1].strip("/")
176-
file_path = unquote(
177-
file_checksum_path.split(
178-
"data/contents/",
179-
)[1]
180-
)
181-
f = File(file_path, unquote(file.path), self._checksums[file_checksum_path])
176+
file_path = file_checksum_path.split("data/contents/")[1]
177+
f = File(file_path, file.path, self._checksums[file_checksum_path])
182178
self._parsed_files.append(f)
183179
return self._parsed_files
184180

@@ -192,7 +188,7 @@ def populate_metadata(_aggr):
192188
self._parsed_aggregations = []
193189
for file in self._map.describes.files:
194190
if is_aggregation(str(file)):
195-
self._parsed_aggregations.append(Aggregation(unquote(file.path), self._hs_session, self._checksums))
191+
self._parsed_aggregations.append(Aggregation(file.path, self._hs_session, self._checksums))
196192

197193
# load metadata for all aggregations (metadata is needed to create any typed aggregation)
198194
with ThreadPoolExecutor() as executor:

0 commit comments

Comments
 (0)