Browse Source

fixup: compute all from sync.*

Thomas Waldmann 6 years ago
parent
commit
b407b36320
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/borg/archive.py

+ 5 - 3
src/borg/archive.py

@@ -500,13 +500,15 @@ Utilization of max. archive size: {csize_max:.0%}
             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