We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e77e04 commit 5b1a914Copy full SHA for 5b1a914
src/huggingface_hub/hf_file_system.py
@@ -445,7 +445,7 @@ def _ls_tree(
445
common_path_depth = common_path[len(path) :].count("/")
446
maxdepth -= common_path_depth
447
out = [o for o in out if not o["name"].startswith(common_path + "/")]
448
- for cached_path in self.dircache:
+ for cached_path in list(self.dircache):
449
if cached_path.startswith(common_path + "/"):
450
self.dircache.pop(cached_path, None)
451
self.dircache.pop(common_path, None)
0 commit comments