[unpackfs] Don't jump back in progress while counting

This commit is contained in:
Adriaan de Groot 2020-04-06 17:06:53 +02:00
parent af0d04d523
commit facf5af589

View File

@ -309,10 +309,10 @@ class UnpackOperation:
source_mount_path = tempfile.mkdtemp() source_mount_path = tempfile.mkdtemp()
try: try:
job.setprogress(0.0) complete = 0
for entry in self.entries: for entry in self.entries:
status = _("Starting to unpack {}").format(entry.source) 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_mount(source_mount_path)
entry.do_count() # Fill in the entry.total entry.do_count() # Fill in the entry.total