fix: incorrect warnings for decompression

This commit is contained in:
figsoda 2022-09-01 14:24:49 -04:00
parent 99ec7d2cf2
commit 1f8cbdd360

View File

@ -381,7 +381,10 @@ fn check_mime_type(
// File ending with extension // File ending with extension
// Try to detect the extension and warn the user if it differs from the written one // Try to detect the extension and warn the user if it differs from the written one
let outer_ext = format.iter().next_back().unwrap(); let outer_ext = format.iter().next_back().unwrap();
if outer_ext != &detected_format { if !outer_ext
.compression_formats
.ends_with(detected_format.compression_formats)
{
warning!( warning!(
"The file extension: `{}` differ from the detected extension: `{}`", "The file extension: `{}` differ from the detected extension: `{}`",
outer_ext, outer_ext,