mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 17:53:13 +08:00
Prevent crashes when backup fails to be restored
Also add a bit of logging so that we know what / how it went wrong
This commit is contained in:
parent
915e0e2047
commit
1c9eab6b2b
@ -148,5 +148,9 @@ class Backup:
|
||||
Logger.log("d", "Removing current data in location: %s", target_path)
|
||||
Resources.factoryReset()
|
||||
Logger.log("d", "Extracting backup to location: %s", target_path)
|
||||
archive.extractall(target_path)
|
||||
try:
|
||||
archive.extractall(target_path)
|
||||
except PermissionError:
|
||||
Logger.logException("e", "Unable to extract the backup due to permission errors")
|
||||
return False
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user