mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-22 09:30:15 +00:00
Use represents_several_files
instead of checking len of files
This commit is contained in:
parent
aa65743e4e
commit
baf23fa685
@ -103,7 +103,7 @@ pub fn run(command: Command, flags: &oof::Flags) -> crate::Result<()> {
|
||||
|
||||
let output_file = fs::File::create(&output_path)?;
|
||||
|
||||
if files.len() == 1 {
|
||||
if !represents_several_files(&files) {
|
||||
// It's possible the file is already partially compressed so we don't want to compress it again
|
||||
// `ouch compress file.tar.gz file.tar.gz.xz` should produce `file.tar.gz.xz` and not `file.tar.gz.tar.gz.xz`
|
||||
let input_extensions = extension::extensions_from_path(&files[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user