From ab1be53102b5c2e71a241b7529ba4b4f6dd666db Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 12 Apr 2020 23:59:59 +0800 Subject: [PATCH] add zip -r --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c77f439..c3edd40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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;