feat: update info

This commit is contained in:
2023-09-06 00:34:26 +08:00
parent d1d5c166de
commit d96ebdd5ba
6 changed files with 80 additions and 57 deletions

View File

@@ -11,7 +11,10 @@ use crate::file;
pub fn decrypt(path: PathBuf, pin: &Option<String>) -> XResult<()> {
let path_display = format!("{}", path.display());
let mut file_in = opt_result!(File::open(path), "Open file: {} failed: {}", &path_display);
let meta = opt_result!(file::read_tiny_encrypt_meta(&mut file_in), "Read file: {}, failed: {}", &path_display);
let mut meta = opt_result!(file::read_tiny_encrypt_meta(&mut file_in), "Read file: {}, failed: {}", &path_display);
meta.normalize();
debugging!("Found meta: {}", serde_json::to_string_pretty(&meta).unwrap());
let mut card = match get_card() {
Err(e) => {