mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
Fix error with format infer
This commit is contained in:
parent
dc78c96c3f
commit
92372813a5
@ -507,7 +507,7 @@ fn check_mime_type(
|
|||||||
} else if let Some(detected_format) = try_infer_extension(path) {
|
} else if let Some(detected_format) = try_infer_extension(path) {
|
||||||
// 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().unwrap();
|
let outer_ext = format.iter().next_back().unwrap();
|
||||||
if outer_ext != &detected_format {
|
if outer_ext != &detected_format {
|
||||||
warning!(
|
warning!(
|
||||||
"The file extension: `{}` differ from the detected extension: `{}`",
|
"The file extension: `{}` differ from the detected extension: `{}`",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user