Merge pull request #651 from selfhost-alt/handle-another-backup-parse-error

Gracefully handle unexpected end of file when listing backup files
This commit is contained in:
advplyr 2022-06-02 07:26:42 -05:00 committed by GitHub
commit 2dba17a7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,9 @@ class BackupManager {
if (error.message === "Bad archive") {
Logger.warn(`[BackupManager] Backup appears to be corrupted: ${fullFilePath}`)
continue;
} else if (error.message === "unexpected end of file") {
Logger.warn(`[BackupManager] Backup appears to be corrupted: ${fullFilePath}`)
continue;
} else {
throw error
}