From c7f69194e835912fe3df6d005cf793ae60008781 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Fri, 15 Sep 2023 22:37:59 -0300 Subject: [PATCH] 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 --- src/check.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/check.rs b/src/check.rs index 902f792..62d97c5 100644 --- a/src/check.rs +++ b/src/check.rs @@ -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(())) } -- 2.11.4.GIT