mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Include new database corruption check for SQL errors
This commit is contained in:
@@ -415,9 +415,14 @@ function _updateJob(id: number, data: ClientJobUpdateType) {
|
||||
`SQL channel job ${id} (${fnName}) failed in ${end - start}ms`
|
||||
);
|
||||
|
||||
if (error && error.message && error.message.includes('SQLITE_CORRUPT')) {
|
||||
if (
|
||||
error &&
|
||||
error.message &&
|
||||
(error.message.includes('SQLITE_CORRUPT') ||
|
||||
error.message.includes('database disk image is malformed'))
|
||||
) {
|
||||
window.log.error(
|
||||
'Detected SQLITE_CORRUPT error; restarting the application immediately'
|
||||
`Detected corruption. Restarting the application immediately. Error: ${error.message}`
|
||||
);
|
||||
window.restart();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user