Skip to content

Commit

Permalink
fixup: compute all from sync.*
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Feb 5, 2019
1 parent f8feaa7 commit b407b36
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/borg/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,15 @@ def add(id):
add(id)
data = self.key.decrypt(id, chunk)
sync.feed(data)
size, csize, unique_size, unique_csize, unique_chunks, chunks = archive_index.stats_against(cache.chunks)
unique_csize = archive_index.stats_against(cache.chunks)[3]
pi.finish()
stats = Statistics()
stats.nfiles = sync.num_files_totals if self.consider_part_files \
else sync.num_files_totals - sync.num_files_parts
stats.osize = size if self.consider_part_files else size - sync.size_parts
stats.csize = csize if self.consider_part_files else csize - sync.csize_parts
stats.osize = sync.size_totals if self.consider_part_files \
else sync.size_totals - sync.size_parts
stats.csize = sync.csize_totals if self.consider_part_files \
else sync.csize_totals - sync.csize_parts
stats.usize = unique_csize # the part files use same chunks as the full file
return stats

Expand Down

0 comments on commit b407b36

Please sign in to comment.