feat: optimize code

This commit is contained in:
2023-10-28 17:47:38 +08:00
parent 9d3de9c8f0
commit e355d0f03d

View File

@@ -202,11 +202,7 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
debugging!("Inner decrypt file{}: {} elapsed: {} ms", compressed_desc, path_display, encrypt_duration.as_millis());
if cmd_decrypt.remove_file {
if do_skip_file_out {
warning!("Cannot remove encrypted file when file out is skipped.");
} else {
util::remove_file_with_msg(path);
}
util::remove_file_with_msg(path);
}
Ok(meta.file_length)
}