Process events while extracting the downloaded backup

To prevent the UI from being frozen. This way, the user knows that something is happening in the background and Cura didn't just stop working.

CURA-8313
This commit is contained in:
Konstantinos Karmas 2021-06-22 17:01:36 +02:00
parent 4f5e055cd8
commit bcd44b8b6f

View file

@ -194,7 +194,10 @@ class Backup:
Resources.factoryReset()
Logger.log("d", "Extracting backup to location: %s", target_path)
try:
archive.extractall(target_path)
name_list = archive.namelist()
for archive_filename in name_list:
archive.extract(archive_filename, target_path)
CuraApplication.getInstance().processEvents()
except (PermissionError, EnvironmentError):
Logger.logException("e", "Unable to extract the backup due to permission or file system errors.")
return False