Skip to content

Commit c7c4efc

Browse files
committed
Fix sqlite store
1 parent fb01742 commit c7c4efc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

zarr/_storage/v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def rmdir(self, path=None):
490490
if path:
491491
for base in [meta_root, data_root]:
492492
with self.lock:
493-
self.cursor.execute('DELETE FROM zarr WHERE k LIKE (? || "/%")', (base + path,))
493+
self.cursor.execute("DELETE FROM zarr WHERE k LIKE (? || '/%')", (base + path,))
494494
# remove any associated metadata files
495495
sfx = _get_metadata_suffix(self)
496496
meta_dir = (meta_root + path).rstrip("/")

zarr/storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,7 @@ def listdir(self, path=None):
27812781
f"""
27822782
SELECT DISTINCT SUBSTR(m, 0, INSTR(m, "/")) AS l FROM (
27832783
SELECT LTRIM(SUBSTR(k, LENGTH(?) + 1), "/") || "/" AS m
2784-
FROM zarr WHERE k LIKE (? || "{sep}%")
2784+
FROM zarr WHERE k LIKE (? || '{sep}%')
27852785
) ORDER BY l ASC
27862786
""",
27872787
(path, path),
@@ -2806,7 +2806,7 @@ def rmdir(self, path=None):
28062806
path = normalize_storage_path(path)
28072807
if path:
28082808
with self.lock:
2809-
self.cursor.execute('DELETE FROM zarr WHERE k LIKE (? || "/%")', (path,))
2809+
self.cursor.execute("DELETE FROM zarr WHERE k LIKE (? || '/%')", (path,))
28102810
else:
28112811
self.clear()
28122812

0 commit comments

Comments
 (0)