add zip -r

This commit is contained in:
2020-04-12 23:59:59 +08:00
parent 136aafe2db
commit ab1be53102

View File

@@ -140,7 +140,7 @@ fn process_config_item(options: &Options, config_item: &OSSBackupdConfigItem,
#[cfg(feature = "use_zip")]
let zip_file = || {
let mut cmd = std::process::Command::new("zip");
cmd.args(&[temp_zip_file, target]);
cmd.args(&["-r", temp_zip_file, target]);
if let Err(e) = rust_util::util_cmd::run_command_and_wait(&mut cmd) {
print_message(MessageType::ERROR, &format!("Error in zip file: {}, at item index: {}", e, item_index));
return false;