From facf5af589d0c9f60270929715f7cefb905d5ae1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Apr 2020 17:06:53 +0200 Subject: [PATCH] [unpackfs] Don't jump back in progress while counting --- src/modules/unpackfs/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 1a4059848..50ee5b1a0 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -309,10 +309,10 @@ class UnpackOperation: source_mount_path = tempfile.mkdtemp() try: - job.setprogress(0.0) + complete = 0 for entry in self.entries: status = _("Starting to unpack {}").format(entry.source) - job.setprogress(0.0) + job.setprogress( ( 1.0 * complete ) / len(self.entries) ) entry.do_mount(source_mount_path) entry.do_count() # Fill in the entry.total