Skip to content

Commit

Permalink
Merge pull request #322 from elyall/master
Browse files Browse the repository at this point in the history
fix reading HCS datasets at cloud paths #321
  • Loading branch information
joshmoore authored Nov 13, 2023
2 parents 92ad918 + c159b79 commit 90b5ff9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ome_zarr/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,16 @@ def subpath(self, subpath: str = "") -> str:
filename = Path(self.__path) / subpath
filename = filename.resolve()
return str(filename)
else:
if self.__store.fs.protocol in ["http", "https"]:
url = str(self.__path)
if not url.endswith("/"):
url = f"{url}/"
return urljoin(url, subpath)
else:
if self.__path.endswith("/"):
return f"{self.__path}{subpath}"
else:
return f"{self.__path}/{subpath}"


def parse_url(
Expand Down

0 comments on commit 90b5ff9

Please sign in to comment.