Skip to content

Commit

Permalink
fix _list_buckets with disabled caching (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
SophieHallstedtQC committed Feb 16, 2022
1 parent 6ce46c2 commit 185d09c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gcsfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,11 @@ async def _list_buckets(self):
items.extend(page.get("items", []))
next_page_token = page.get("nextPageToken", None)

self.dircache[""] = [
buckets = [
{"name": i["name"] + "/", "size": 0, "type": "directory"} for i in items
]
self.dircache[""] = buckets
return buckets
return self.dircache[""]

def invalidate_cache(self, path=None):
Expand Down

0 comments on commit 185d09c

Please sign in to comment.