From baf23fa685922bf7a16d3ace76b43ce763914e1b Mon Sep 17 00:00:00 2001 From: Spyros Roum Date: Fri, 15 Oct 2021 02:45:07 +0300 Subject: [PATCH] Use `represents_several_files` instead of checking len of `files` --- src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index 1e221ef..32c60fc 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -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]);