fix only process one file.
This commit is contained in:
parent
f52148194f
commit
bd58da1c17
@ -41,7 +41,7 @@ fn process_compressed_files(path: &Path) -> io::Result<()> {
|
||||
process_compressed_files(&entry_path)?;
|
||||
} else if let Some(ext) = entry_path.extension().and_then(|e| e.to_str()) {
|
||||
if ext == "rar" || ext == "zip" {
|
||||
return unar_file(&entry_path);
|
||||
unar_file(&entry_path).expect("UNAR Error.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -58,6 +58,10 @@ fn main() -> io::Result<()> {
|
||||
PathBuf::from(".")
|
||||
};
|
||||
|
||||
if start_path.is_file() {
|
||||
return unar_file(&start_path);
|
||||
}
|
||||
|
||||
process_compressed_files(&start_path)?;
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user