Also report failure if the file system can't handle the archive contents

For instance if the file name is too long for this file system, if the computer is running out of disk space or if there is a general failure to write here.

Fixes Sentry issue CURA-YQ.
This commit is contained in:
Ghostkeeper 2020-06-25 09:47:59 +02:00
parent 0738696312
commit 79cc6ec897
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -169,7 +169,7 @@ class Backup:
Logger.log("d", "Extracting backup to location: %s", target_path)
try:
archive.extractall(target_path)
except PermissionError:
Logger.logException("e", "Unable to extract the backup due to permission errors")
except (PermissionError, EnvironmentError):
Logger.logException("e", "Unable to extract the backup due to permission or file system errors.")
return False
return True