Skip to content

Commit

Permalink
Accept "file" or ("file, "local"") for protocol
Browse files Browse the repository at this point in the history
A change in fsspec led to growing numbers of "../.." entries
at the end of the filepaths. A call to resolve() is always
needed in order to keep the file paths canonical.
  • Loading branch information
joshmoore committed Jan 31, 2024
1 parent d9ede44 commit 1072b20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ome_zarr/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ def parts(self) -> List[str]:
return self.__path.split("/")

def subpath(self, subpath: str = "") -> str:
if self.__store.fs.protocol == "file":
if self.__store.fs.protocol == "file" or self.__store.fs.protocol == (
"file",
"local",
):
filename = Path(self.__path) / subpath
filename = filename.resolve()
return str(filename)
Expand Down

0 comments on commit 1072b20

Please sign in to comment.