@@ -2779,9 +2779,9 @@ def listdir(self, path=None):
2779
2779
sep = "_" if path == "" else "/"
2780
2780
keys = self .cursor .execute (
2781
2781
f"""
2782
- SELECT DISTINCT SUBSTR(m, 0, INSTR(m, "/" )) AS l FROM (
2783
- SELECT LTRIM(SUBSTR(k, LENGTH(?) + 1), "/" ) || "/" AS m
2784
- FROM zarr WHERE k LIKE (? || " { sep } %" )
2782
+ SELECT DISTINCT SUBSTR(m, 0, INSTR(m, '/' )) AS l FROM (
2783
+ SELECT LTRIM(SUBSTR(k, LENGTH(?) + 1), '/' ) || '/' AS m
2784
+ FROM zarr WHERE k LIKE (? || ' { sep } %' )
2785
2785
) ORDER BY l ASC
2786
2786
""" ,
2787
2787
(path , path ),
@@ -2794,8 +2794,8 @@ def getsize(self, path=None):
2794
2794
size = self .cursor .execute (
2795
2795
"""
2796
2796
SELECT COALESCE(SUM(LENGTH(v)), 0) FROM zarr
2797
- WHERE k LIKE (? || "%" ) AND
2798
- 0 == INSTR(LTRIM(SUBSTR(k, LENGTH(?) + 1), "/" ), "/" )
2797
+ WHERE k LIKE (? || '%' ) AND
2798
+ 0 == INSTR(LTRIM(SUBSTR(k, LENGTH(?) + 1), '/' ), '/' )
2799
2799
""" ,
2800
2800
(path , path ),
2801
2801
)
@@ -2806,7 +2806,7 @@ def rmdir(self, path=None):
2806
2806
path = normalize_storage_path (path )
2807
2807
if path :
2808
2808
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 ,))
2810
2810
else :
2811
2811
self .clear ()
2812
2812
0 commit comments