Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-09-21 15:20:59 +0300
committerGhostkeeper <rubend@tutanota.com>2021-09-21 15:20:59 +0300
commit9ab41c062bcba7622d6a50b9a13d69a9692a79d1 (patch)
treecc7d4db75e2ea2cfc75cdef756261a4441449d6c /cura/Backups
parent58f4d44694ef708f4a0399c428d3f129c9733df5 (diff)
Handle encoding errors in back-up zips
Seems to happen when there's files in there with badly-encoded characters in the file names. Fixes Sentry issue CURA-2S7.
Diffstat (limited to 'cura/Backups')
-rw-r--r--cura/Backups/Backup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cura/Backups/Backup.py b/cura/Backups/Backup.py
index 02badedefa..90a354c0a3 100644
--- a/cura/Backups/Backup.py
+++ b/cura/Backups/Backup.py
@@ -206,6 +206,8 @@ class Backup:
archive.extract(archive_filename, target_path)
except (PermissionError, EnvironmentError):
Logger.logException("e", f"Unable to extract the file {archive_filename} from the backup due to permission or file system errors.")
+ except UnicodeEncodeError:
+ Logger.error(f"Unable to extract the file {archive_filename} because of an encoding error.")
CuraApplication.getInstance().processEvents()
return True