diff --git a/src/cmd_decrypt.rs b/src/cmd_decrypt.rs index 8fa86e7..90d3669 100644 --- a/src/cmd_decrypt.rs +++ b/src/cmd_decrypt.rs @@ -34,7 +34,7 @@ pub struct CmdDecrypt { pub slot: Option, /// Remove source file #[arg(long, short = 'R')] - pub remove_source_file: bool, + pub remove_file: bool, } pub fn decrypt(cmd_decrypt: CmdDecrypt) -> XResult<()> { @@ -78,7 +78,7 @@ pub fn decrypt_single(path: &PathBuf, pin: &Option, slot: &Option warning!("Remove file: {} failed: {}", path_display, e), Ok(_) => information!("Remove file: {} succeed", path_display), diff --git a/src/cmd_encrypt.rs b/src/cmd_encrypt.rs index 98c2224..4b4f8cb 100644 --- a/src/cmd_encrypt.rs +++ b/src/cmd_encrypt.rs @@ -42,7 +42,7 @@ pub struct CmdEncrypt { pub compatible_with_1_0: bool, /// Remove source file #[arg(long, short = 'R')] - pub remove_source_file: bool, + pub remove_file: bool, } pub fn encrypt(cmd_encrypt: CmdEncrypt) -> XResult<()> { @@ -130,7 +130,7 @@ fn encrypt_single(path: &PathBuf, envelops: &[&TinyEncryptConfigEnvelop], cmd_en util::zeroize(nonce); drop(file_in); drop(file_out); - if cmd_encrypt.remove_source_file { + if cmd_encrypt.remove_file { match fs::remove_file(path) { Err(e) => warning!("Remove file: {} failed: {}", path_display, e), Ok(_) => information!("Remove file: {} succeed", path_display),