mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
feat: Deduplicate blob files in chat.rs, config.rs, and integration.rs
These were the last places in the `deltachat` crate where files were stored without deduplication. The CFFI python bindings are the last thing that's still missing.
This commit is contained in:
@@ -764,7 +764,8 @@ impl Context {
|
||||
.await?;
|
||||
match value {
|
||||
Some(path) => {
|
||||
let mut blob = BlobObject::new_from_path(self, path.as_ref()).await?;
|
||||
let path = get_abs_path(self, Path::new(path));
|
||||
let mut blob = BlobObject::create_and_deduplicate(self, &path, &path)?;
|
||||
blob.recode_to_avatar_size(self).await?;
|
||||
self.sql
|
||||
.set_raw_config(key.as_ref(), Some(blob.as_name()))
|
||||
|
||||
Reference in New Issue
Block a user