Skip to content

Commit 4897344

Browse files
committed
fs.find: cache path id
1 parent 0a50287 commit 4897344

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: pydrive2/fs/spec.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,7 @@ def find(self, path, detail=False, **kwargs):
476476
cached = base in self._ids_cache["dirs"]
477477
if not cached:
478478
dir_ids = self._path_to_item_ids(base)
479-
if dir_ids:
480-
dir_id = min(dir_ids)
481-
self._cache_path_id(base, dir_id)
482-
for item in self._gdrive_list_ids([dir_id]):
483-
item_path = posixpath.join(base, item["title"])
484-
self._cache_path_id(item_path, item["id"])
479+
self._cache_path_id(base, *dir_ids)
485480

486481
dir_ids = [self._ids_cache["ids"].copy()]
487482
contents = []

0 commit comments

Comments
 (0)