feat: rename arg
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user