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 8b9f446 commit ed740c3Copy full SHA for ed740c3
src/huggingface_hub/_local_folder.py
@@ -90,7 +90,7 @@ def incomplete_path(self, etag: str) -> Path:
90
resolved_path = str(path.resolve())
91
# Some Windows versions do not allow for paths longer than 255 characters.
92
# In this case, we must specify it as an extended path by using the "\\?\" prefix.
93
- if len(resolved_path) > 255 and not resolved_path.startswith("\\\\?\\"):
+ if os.name == "nt" and len(resolved_path) > 255 and not resolved_path.startswith("\\\\?\\"):
94
path = Path("\\\\?\\" + resolved_path)
95
return path
96
0 commit comments