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

Auto track binary files #828

Merged
merged 9 commits into from Apr 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/huggingface_hub/repository.py
Expand Up @@ -239,7 +239,7 @@ def is_binary_file(filename: Union[str, Path]) -> bool:
"""
try:
with open(filename) as f:
content = f.read()
content = f.read(512)
coyotte508 marked this conversation as resolved.
Show resolved Hide resolved

# Check for the presence of the null character in the string
return "\x00" in content
Expand Down