Browse Source

Detect rar archives by mime type

RAR archives might not have .rar extension, see [Wikipedia](https://en.wikipedia.org/wiki/RAR_(file_format))
pull/2032/head
Tobias Mühl 4 years ago
committed by GitHub
parent
commit
a8864e2abd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      weed/util/compression.go

3
weed/util/compression.go

@ -147,6 +147,9 @@ func IsZstdContent(data []byte) bool {
if strings.HasSuffix(mtype, "script") {
return true, true
}
if strings.HasSuffix(mtype, "vnd.rar) {
return false, true
}
}
if strings.HasPrefix(mtype, "audio/") {

Loading…
Cancel
Save