mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
Merge pull request #205 from ouch-org/fix-format-infer
Fix error with format infer
This commit is contained in:
commit
1dc06e798a
@ -507,7 +507,7 @@ fn check_mime_type(
|
||||
} else if let Some(detected_format) = try_infer_extension(path) {
|
||||
// File ending with extension
|
||||
// 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 {
|
||||
warning!(
|
||||
"The file extension: `{}` differ from the detected extension: `{}`",
|
||||
|
Loading…
x
Reference in New Issue
Block a user