mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-21 00:50:14 +00:00
fixed check_mime_type usage
This commit is contained in:
parent
4c616ced10
commit
a3dca85cdd
@ -137,13 +137,13 @@ pub fn run(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for path in files.iter() {
|
for path in files.iter() {
|
||||||
let (path, mut file_formats) = extension::separate_known_extensions_from_name(path);
|
let (pathbase, mut file_formats) = extension::separate_known_extensions_from_name(path);
|
||||||
|
|
||||||
if let ControlFlow::Break(_) = check::check_mime_type(path, &mut file_formats, question_policy)? {
|
if let ControlFlow::Break(_) = check::check_mime_type(path, &mut file_formats, question_policy)? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
output_paths.push(path);
|
output_paths.push(pathbase);
|
||||||
formats.push(file_formats);
|
formats.push(file_formats);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user