mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 10:18:59 +08:00
Fail gracefully if writing the backup to a temp file crashes
Fixes sentry issue CURA-21W
This commit is contained in:
parent
544b267447
commit
df5c52d1c6
@ -61,7 +61,11 @@ class RestoreBackupJob(Job):
|
||||
app = CuraApplication.getInstance()
|
||||
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
||||
while bytes_read:
|
||||
try:
|
||||
write_backup.write(bytes_read)
|
||||
except Exception as e:
|
||||
Logger.logException("e", "An error occurred while writing the backup to a temporary file: {}. The restoration of the backup is aborted.".format(e))
|
||||
return
|
||||
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
||||
app.processEvents()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user