Skip to content

Commit

Permalink
BF: fix download_directory for side-effect of normalizing paths while…
Browse files Browse the repository at this point in the history
… getting listing
  • Loading branch information
yarikoptic committed Jun 14, 2024
1 parent c291755 commit 0aabf16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,9 @@ def download_directory(
"""
if assets_dirpath and not assets_dirpath.endswith("/"):
assets_dirpath += "/"
# need to normalize explicitly since we do use it below also
# to deduce portion of the path to strip off.
assets_dirpath = self._normalize_path(assets_dirpath)

Check warning on line 1263 in dandi/dandiapi.py

View check run for this annotation

Codecov / codecov/patch

dandi/dandiapi.py#L1263

Added line #L1263 was not covered by tests
assets = list(self.get_assets_with_path_prefix(assets_dirpath))
for a in assets:
filepath = Path(dirpath, a.path[len(assets_dirpath) :])
Expand Down

0 comments on commit 0aabf16

Please sign in to comment.