Skip to content

Commit

Permalink
to support fsspec/kerchunk#488 (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant authored Aug 2, 2024
1 parent 3ff5fca commit 8f29d95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fsspec/implementations/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ def flush(self, base_url=None, storage_options=None):
if k != ".zmetadata" and ".z" in k:
self.zmetadata[k] = json.loads(self._items.pop(k))
met = {"metadata": self.zmetadata, "record_size": self.record_size}
self._items.clear()
self._items[".zmetadata"] = json.dumps(met).encode()
self.fs.pipe(
"/".join([base_url or self.out_root, ".zmetadata"]),
Expand Down Expand Up @@ -1085,7 +1086,7 @@ def isdir(self, path): # overwrite auto-sync version
if self.dircache:
return path in self.dircache
elif isinstance(self.references, LazyReferenceMapper):
return path in self.references.listdir("")
return path in self.references.listdir()
else:
# this may be faster than building dircache for single calls, but
# by looping will be slow for many calls; could cache it?
Expand Down

0 comments on commit 8f29d95

Please sign in to comment.