diff --git a/src/contact.rs b/src/contact.rs index 02e34dcac..a802148d4 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -1435,7 +1435,7 @@ impl Contact { pub async fn get_profile_image(&self, context: &Context) -> Result> { if self.id == ContactId::SELF { if let Some(p) = context.get_config(Config::Selfavatar).await? { - return Ok(Some(PathBuf::from(p))); + return Ok(Some(PathBuf::from(p))); // get_config() calls get_abs_path() internally already } } else if let Some(image_rel) = self.param.get(Param::ProfileImage) { if !image_rel.is_empty() { diff --git a/src/sql.rs b/src/sql.rs index a355e62b0..16b65bcb7 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -251,7 +251,7 @@ impl Sql { if recode_avatar { if let Some(avatar) = context.get_config(Config::Selfavatar).await? { - let mut blob = BlobObject::from_name(context, avatar)?; + let mut blob = BlobObject::from_path(context, Path::new(&avatar))?; match blob.recode_to_avatar_size(context).await { Ok(()) => { if let Some(path) = blob.to_abs_path().to_str() {