Skip to content

Commit

Permalink
fix: freeze during file preview (#1836)
Browse files Browse the repository at this point in the history
* fix: do not load binary content

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>

* fix: smarter isBinary check

old one used 7 year old package that had hardcoded check of first 24
bytes, which was not always the best test.

istextorbinary one checks name and 24 bytes at the start, middle,
and end of the buffer – https://github.com/bevry/istextorbinary#readme

Co-authored-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
hacdias and lidel authored Sep 1, 2021
1 parent b2e6208 commit 675564e
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 75 deletions.
Loading

0 comments on commit 675564e

Please sign in to comment.