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) }