feat: optimize --skip-decrypt-file
This commit is contained in:
@@ -130,11 +130,6 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
|
||||
let enc_meta = parse_encrypted_meta(&meta, &key.0, &nonce.0)?;
|
||||
parse_encrypted_comment(&meta, &key.0, &nonce.0)?;
|
||||
|
||||
if cmd_decrypt.skip_decrypt_file {
|
||||
information!("Decrypt file is skipped.");
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
// Decrypt to output
|
||||
if cmd_decrypt.direct_print {
|
||||
if meta.file_length > 10 * 1024 {
|
||||
@@ -164,6 +159,11 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
|
||||
return Ok(meta.file_length);
|
||||
}
|
||||
|
||||
if cmd_decrypt.skip_decrypt_file {
|
||||
information!("Decrypt file content is skipped.");
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
// Decrypt to file
|
||||
let compressed_desc = iff!(meta.compress, " [compressed]", "");
|
||||
let start = Instant::now();
|
||||
|
||||
Reference in New Issue
Block a user