Skip to content

Commit

Permalink
fixes bug in fsstore-creation (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz authored Oct 19, 2023
1 parent 24c974a commit e25989e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions webknossos/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
### Changed

### Fixed
- Fixes bug in FSStore creation when using local paths for zarr data format. [#955](https://github.com/scalableminds/webknossos-libs/pull/955)


## [0.14.2](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.14.2) - 2023-10-18
Expand Down
4 changes: 2 additions & 2 deletions webknossos/webknossos/dataset/_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from zarr.storage import FSStore

from ..geometry import BoundingBox, Vec3Int, Vec3IntLike
from ..utils import warn_deprecated
from ..utils import is_fs_path, warn_deprecated
from .data_format import DataFormat

if TYPE_CHECKING:
Expand All @@ -29,7 +29,7 @@ def _is_power_of_two(num: int) -> bool:

def _fsstore_from_path(path: Path, mode: str = "a") -> FSStore:
storage_options = {}
if isinstance(path, UPath):
if isinstance(path, UPath) and not is_fs_path(path):
storage_options = path._kwargs.copy()
storage_options.pop("_url", None)
return FSStore(url=str(path), mode=mode, **storage_options)
Expand Down

0 comments on commit e25989e

Please sign in to comment.