Skip to content

Commit 53ee84c

Browse files
authored
find: cache path item ids (#286)
1 parent 37551b3 commit 53ee84c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: pydrive2/fs/spec.py

+5
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,11 @@ def find(self, path, detail=False, **kwargs):
473473
bucket, base = self.split_path(path)
474474

475475
seen_paths = set()
476+
cached = base in self._ids_cache["dirs"]
477+
if not cached:
478+
dir_ids = self._path_to_item_ids(base)
479+
self._cache_path_id(base, *dir_ids)
480+
476481
dir_ids = [self._ids_cache["ids"].copy()]
477482
contents = []
478483
while dir_ids:

0 commit comments

Comments
 (0)