Treat .zip files as binary unconditionally

Improves #358
pull/369/head
Wilfred Hughes 2022-09-10 12:21:57 +07:00
parent 3a8b0ebaf8
commit fe30b7d86b
2 changed files with 6 additions and 0 deletions

@ -9,6 +9,8 @@ over unchanged punctuation.
Added support for QML.
ZIP files are now always treated as binary files.
## 0.35 (released 2nd September 2022)
### Diffing

@ -115,6 +115,10 @@ pub fn guess_content(bytes: &[u8]) -> ProbableFileKind {
match mime {
// Treat pdf as binary.
"application/pdf" => return ProbableFileKind::Binary,
// application/* is a mix of stuff, application/json is fine
// but application/zip is binary that often looks text-ish to
// our heuristics.
"application/zip" => return ProbableFileKind::Binary,
// Treat all image content as binary.
v if v.starts_with("image/") => return ProbableFileKind::Binary,
// Treat all audio content as binary.