Skip to content

Commit

Permalink
fix: fix behavior of get_url for http urls
Browse files Browse the repository at this point in the history
  • Loading branch information
d-v-b committed Oct 16, 2023
1 parent 2e4e29c commit 0b1997c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fibsem_tools/io/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,13 @@ def get_url(node: Union[zarr.Group, zarr.Array]):
protocol = store.fs.protocol
else:
protocol = "file"
return f"{protocol}://{os.path.join(node.store.path, node.path)}"

# fsstore keeps the protocol in the path, but not s3store
if '://' in store.path:
store_path = store.path.split('://')[-1]
else:
store_path = store.path
return f"{protocol}://{os.path.join(store_path, node.path)}"
else:
raise ValueError(
f"""
Expand Down

0 comments on commit 0b1997c

Please sign in to comment.