Skip to content

Commit 18955eb

Browse files
wip: set paths correctly for local FS
1 parent fa368f5 commit 18955eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cloudvolume/datasource/precomputed/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from typing import Optional, Union
22

3+
import os
4+
35
from .image import PrecomputedImageSource
46
from .metadata import PrecomputedMetadata
57
from .mesh import PrecomputedMeshSource
@@ -63,13 +65,15 @@ def create_precomputed(
6365
if meta.info.get("@type", "") == "neuroglancer_skeletons":
6466
info = meta.info
6567
meta = synthetic_meta(cloudpath, config, cache_service)
68+
meta.info["skeletons"] = os.path.basename(cloudpath)
6669
skeleton = PrecomputedSkeletonSource(meta, cache_service, config, readonly, info=info)
6770
else:
6871
skeleton = PrecomputedSkeletonSource(meta, cache_service, config, readonly)
6972

7073
if meta.info.get("@type", "") in ["neuroglancer_legacy_mesh", "neuroglancer_multilod_draco"]:
7174
info = meta.info
7275
meta = synthetic_meta(cloudpath, config, cache_service)
76+
meta.info["mesh"] = os.path.basename(cloudpath)
7377
mesh = PrecomputedMeshSource(meta, cache_service, config, readonly, info=info)
7478
else:
7579
mesh = PrecomputedMeshSource(meta, cache_service, config, readonly)
@@ -135,7 +139,7 @@ def synthetic_meta(cloudpath, config, cache_service) -> PrecomputedMetadata:
135139
volume_size=[1,1,1],
136140
)
137141
return PrecomputedMetadata(
138-
cloudpath,
142+
os.path.dirname(cloudpath),
139143
config=config,
140144
cache=cache_service,
141145
info=info, provenance=None,

0 commit comments

Comments
 (0)