feat: rename arg

This commit is contained in:
2023-10-01 11:10:24 +08:00
parent 5c7a59f8e1
commit 30acd253c9
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ pub struct CmdDecrypt {
pub slot: Option<String>,
/// 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<String>, slot: &Option<String
util::zeroize(nonce);
drop(file_in);
drop(file_out);
if cmd_decrypt.remove_source_file {
if cmd_decrypt.remove_file {
match fs::remove_file(path) {
Err(e) => warning!("Remove file: {} failed: {}", path_display, e),
Ok(_) => information!("Remove file: {} succeed", path_display),