Skip to content

Commit c3a8a63

Browse files
committed
Update tiledb_storage.py
1 parent 4ab5159 commit c3a8a63

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/modelarrayio/storage/tiledb_storage.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ def compute_tile_shape_full_subjects(
9898

9999
def _ensure_parent_group(uri: str):
100100
parent = os.path.dirname(uri.rstrip('/'))
101-
if parent and not tiledb.object_type(parent):
101+
if not parent or parent == uri:
102+
return
103+
if not tiledb.object_type(parent):
104+
if not os.path.exists(parent):
105+
_ensure_parent_group(parent)
102106
tiledb.group_create(parent)
103107

104108

0 commit comments

Comments
 (0)