diff --git a/src/borg/cache.py b/src/borg/cache.py index 5cd3cc497..831a46ee0 100644 --- a/src/borg/cache.py +++ b/src/borg/cache.py @@ -1160,7 +1160,20 @@ def file_known_and_unchanged(self, hashed_path, path_hash, st): def memorize_file(self, hashed_path, path_hash, st, chunks): pass - def add_chunk(self, id, meta, data, *, stats, wait=True, compress=True, size=None, ro_type=ROBJ_FILE_STREAM): + def add_chunk( + self, + id, + meta, + data, + *, + stats, + wait=True, + compress=True, + size=None, + ctype=None, + clevel=None, + ro_type=ROBJ_FILE_STREAM, + ): assert ro_type is not None if not self._txn_active: self.begin_txn() @@ -1172,7 +1185,9 @@ def add_chunk(self, id, meta, data, *, stats, wait=True, compress=True, size=Non refcount = self.seen_chunk(id, size) if refcount: return self.chunk_incref(id, size, stats) - cdata = self.repo_objs.format(id, meta, data, compress=compress, ro_type=ro_type) + cdata = self.repo_objs.format( + id, meta, data, compress=compress, size=size, ctype=ctype, clevel=clevel, ro_type=ro_type + ) self.repository.put(id, cdata, wait=wait) self.chunks.add(id, 1, size) stats.update(size, not refcount)