mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
Merge pull request #270 from figsoda/fix-ext-warning
fix: incorrect warnings for decompression
This commit is contained in:
commit
ff8619acb7
@ -126,6 +126,7 @@ Categories Used:
|
||||
- Fix wrong archive format detection patterns [\#125](https://github.com/ouch-org/ouch/pull/125) ([SpyrosRoum](https://github.com/SpyrosRoum))
|
||||
- Decompressing file without extension gives bad error message [\#137](https://github.com/ouch-org/ouch/issues/137) ([marcospb19](https://github.com/marcospb19))
|
||||
- Fix decompression overwritting files without asking and failing on directories [\#141](https://github.com/ouch-org/ouch/pull/141) ([SpyrosRoum](https://github.com/SpyrosRoum))
|
||||
- Fix incorrect warnings for decompression [\#270](https://github.com/ouch-org/ouch/pull/270) ([figsoda](https://github.com/figsoda))
|
||||
|
||||
### Improvements
|
||||
|
||||
|
@ -381,7 +381,10 @@ fn check_mime_type(
|
||||
// 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_back().unwrap();
|
||||
if outer_ext != &detected_format {
|
||||
if !outer_ext
|
||||
.compression_formats
|
||||
.ends_with(detected_format.compression_formats)
|
||||
{
|
||||
warning!(
|
||||
"The file extension: `{}` differ from the detected extension: `{}`",
|
||||
outer_ext,
|
||||
|
Loading…
x
Reference in New Issue
Block a user