Skip to content

Commit af35d4b

Browse files
authored
fix(fs): remove DVC-specific broken cache optimization (#321)
1 parent a3c9e45 commit af35d4b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pydrive2/fs/spec.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,6 @@ def _ids_cache(self):
256256
}
257257

258258
self._cache_path_id(self.base, cache["root_id"], cache=cache)
259-
260-
for item in self._gdrive_list(
261-
"'{}' in parents and trashed=false".format(cache["root_id"])
262-
):
263-
item_path = posixpath.join(self.base, item["title"])
264-
self._cache_path_id(item_path, item["id"], cache=cache)
265-
266259
return cache
267260

268261
def _cache_path_id(self, path, *item_ids, cache=None):
@@ -392,9 +385,7 @@ def _create_dir(self, parent_id, title, remote_path):
392385
return cached[0]
393386

394387
item = self._gdrive_create_dir(parent_id, title)
395-
396-
if parent_id == self._ids_cache["root_id"]:
397-
self._cache_path_id(remote_path, item["id"])
388+
self._cache_path_id(remote_path, item["id"])
398389

399390
return item["id"]
400391

0 commit comments

Comments
 (0)