From bcd44b8b6fa9151625257d1af3e6b1e6af879712 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 22 Jun 2021 17:01:36 +0200 Subject: [PATCH] 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 --- cura/Backups/Backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/Backups/Backup.py b/cura/Backups/Backup.py index 74ef43f5b2..6128dac320 100644 --- a/cura/Backups/Backup.py +++ b/cura/Backups/Backup.py @@ -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