diff --git a/src/main.rs b/src/main.rs index 432b4a8..9fc1bc4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::fs; use std::io; use std::path::{Path, PathBuf}; -use std::process::Command; +use std::process::{Command, Stdio}; use std::env; fn unar_file(path: &Path) -> io::Result<()> { @@ -11,6 +11,7 @@ fn unar_file(path: &Path) -> io::Result<()> { let output = Command::new("unar") .current_dir(parent_dir) .arg(filename) + .stderr(Stdio::piped()) .output(); match output { @@ -32,7 +33,7 @@ fn is_compressed(path: &Path) -> bool { if let Some(ext) = path.extension() { if let Some(ext) = ext.to_str() { let ext = ext.to_lowercase(); - return ext == "zip" || ext == "rar"; + return ext == "zip" || ext == "rar" || ext == "7z"; } }