fix: do not ignore I/O errors in BlobObject::store_from_base64

This commit is contained in:
link2xt
2025-11-08 00:17:44 +00:00
committed by l
parent fdea6c8af3
commit 1cb0a25e16
4 changed files with 28 additions and 24 deletions

View File

@@ -369,16 +369,15 @@ async fn import_vcard_contact(context: &Context, contact: &VcardContact) -> Resu
return Ok(id);
}
let path = match &contact.profile_image {
Some(image) => match BlobObject::store_from_base64(context, image) {
Err(e) => {
Some(image) => match BlobObject::store_from_base64(context, image)? {
None => {
warn!(
context,
"import_vcard_contact: Could not decode and save avatar for {}: {e:#}.",
contact.addr
"import_vcard_contact: Could not decode avatar for {}.", contact.addr
);
None
}
Ok(path) => Some(path),
Some(path) => Some(path),
},
None => None,
};