Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fs): remove DVC-specific broken cache optimization #321

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions pydrive2/fs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ def _ids_cache(self):
}

self._cache_path_id(self.base, cache["root_id"], cache=cache)

for item in self._gdrive_list(
"'{}' in parents and trashed=false".format(cache["root_id"])
):
item_path = posixpath.join(self.base, item["title"])
self._cache_path_id(item_path, item["id"], cache=cache)

return cache

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

item = self._gdrive_create_dir(parent_id, title)

if parent_id == self._ids_cache["root_id"]:
self._cache_path_id(remote_path, item["id"])
self._cache_path_id(remote_path, item["id"])

return item["id"]

Expand Down
Loading