From a08a3eb1731e04a3d6c3d51669c31c7f74091950 Mon Sep 17 00:00:00 2001 From: vhadzhiev Date: Mon, 20 Feb 2023 11:25:28 +0200 Subject: [PATCH] fixed Statistics.__add__(), fixes #7355 --- src/borg/archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index 0cd81e784..3c277ce08 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -79,8 +79,8 @@ class Statistics: stats.nfiles = self.nfiles + other.nfiles stats.chunking_time = self.chunking_time + other.chunking_time stats.hashing_time = self.hashing_time + other.hashing_time - for key in other.files_stats: - stats.files_stats[key] = self.files_stats[key] + other.files_stats[key] + st1, st2 = self.files_stats, other.files_stats + stats.files_stats = defaultdict(int, {key: (st1[key] + st2[key]) for key in st1.keys() | st2.keys()}) return stats