Browse Source

prune: fix --stats --iec output to use binary units, see #6606

Thomas Waldmann 3 years ago
parent
commit
c86d19cc06
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/borg/archiver.py

+ 2 - 2
src/borg/archiver.py

@@ -1727,8 +1727,8 @@ class Archiver:
                 keep += prune_split(archives, rule, num, kept_because)
                 keep += prune_split(archives, rule, num, kept_because)
 
 
         to_delete = (set(archives) | checkpoints) - (set(keep) | set(keep_checkpoints))
         to_delete = (set(archives) | checkpoints) - (set(keep) | set(keep_checkpoints))
-        stats = Statistics()
-        with Cache(repository, key, manifest, lock_wait=self.lock_wait) as cache:
+        stats = Statistics(iec=args.iec)
+        with Cache(repository, key, manifest, lock_wait=self.lock_wait, iec=args.iec) as cache:
             list_logger = logging.getLogger('borg.output.list')
             list_logger = logging.getLogger('borg.output.list')
             # set up counters for the progress display
             # set up counters for the progress display
             to_delete_len = len(to_delete)
             to_delete_len = len(to_delete)