give a less ambiguous warning for sniff failure

Ouch check for file signatures to be sure that the file indeed has the
correct format as inferred by extension, when that fails, we output a
message explaining that Ouch wasn't able to confirm the format, however,
previous message was confusing with the other extension detection ones
This commit is contained in:
João M. Bezerra 2023-09-15 22:37:59 -03:00 committed by João Marcos
parent dd51525c6c
commit c7f69194e8

View File

@ -66,7 +66,11 @@ pub fn check_mime_type(
} else {
// NOTE: If this actually produces no false positives, we can upgrade it in the future
// to a warning and ask the user if he wants to continue decompressing.
info!(accessible, "Could not detect the extension of `{}`", path.display());
info!(
accessible,
"Failed to confirm the format of `{}` by sniffing the contents, file might be misnamed",
path.display()
);
}
Ok(ControlFlow::Continue(()))
}