Skip to content

Commit 9e7ff04

Browse files
authored
[šŸ›](src/huggingface_hub/utils/_cache_manager.py): Fix bug by ignoring specific files in cache manager (#2660)
1 parent 17e1701 commit 9e7ff04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ā€Žsrc/huggingface_hub/utils/_cache_manager.pyā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def _scan_cached_repo(repo_path: Path) -> CachedRepoInfo:
742742

743743
for ref_path in refs_path.glob("**/*"):
744744
# glob("**/*") iterates over all files and directories -> skip directories
745-
if ref_path.is_dir():
745+
if ref_path.is_dir() or ref_path.name in FILES_TO_IGNORE:
746746
continue
747747

748748
ref_name = str(ref_path.relative_to(refs_path))

0 commit comments

Comments
Ā (0)