allow ouch to decompress archive into existing folder

This commit is contained in:
a-moreira 2022-12-10 19:36:28 -03:00
parent d4f181b40d
commit 3e43f9d7e5

View File

@ -236,10 +236,6 @@ pub fn run(
// The directory that will contain the output files // The directory that will contain the output files
// We default to the current directory if the user didn't specify an output directory with --dir // We default to the current directory if the user didn't specify an output directory with --dir
let output_dir = if let Some(dir) = output_dir { let output_dir = if let Some(dir) = output_dir {
if !utils::clear_path(&dir, question_policy)? {
// User doesn't want to overwrite
return Ok(());
}
utils::create_dir_if_non_existent(&dir)?; utils::create_dir_if_non_existent(&dir)?;
dir dir
} else { } else {