From 90040bbf8e743f98e7b687a9b6eb3db0b52dca69 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Mon, 16 Oct 2023 23:58:50 +0800 Subject: [PATCH] feat: update do_write_file_out --- src/cmd_decrypt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd_decrypt.rs b/src/cmd_decrypt.rs index b56b35b..2a27672 100644 --- a/src/cmd_decrypt.rs +++ b/src/cmd_decrypt.rs @@ -152,7 +152,7 @@ pub fn decrypt_single(config: &Option, util::zeroize(key); util::zeroize(nonce); drop(file_in); - if cmd_decrypt.remove_file { util::remove_file_with_msg(path); } + if do_write_file_out && cmd_decrypt.remove_file { util::remove_file_with_msg(path); } Ok(meta.file_length) }