Toast on main process errors

This commit is contained in:
trevor-signal
2025-09-19 19:00:46 -04:00
committed by GitHub
parent 40eaf078cc
commit 2c1cb5ac4e
8 changed files with 130 additions and 9 deletions

View File

@@ -443,12 +443,15 @@ function deleteOrphanedAttachments({
await sql.sqlRead('finishGetKnownMessageAttachments', cursor);
}
}
log.info(
`cleanupOrphanedAttachments: ${totalAttachmentsFound} message ` +
`attachments; ${orphanedAttachments.size} remain`
`cleanupOrphanedAttachments: ${totalAttachmentsFound} attachments and \
${totalDownloadsFound} downloads found on disk`
);
if (orphanedAttachments.size > 0) {
log.error(`${orphanedAttachments.size} orphaned attachment(s) found`);
}
if (totalMissing > 0) {
log.warn(
`cleanupOrphanedAttachments: ${totalMissing} message attachments were not found on disk`
@@ -460,10 +463,10 @@ function deleteOrphanedAttachments({
attachments: Array.from(orphanedAttachments),
});
log.info(
`cleanupOrphanedAttachments: found ${totalDownloadsFound} downloads ` +
`${orphanedDownloads.size} remain`
);
if (orphanedDownloads.size > 0) {
log.error(`${orphanedDownloads.size} orphaned download(s) found`);
}
await deleteAllDownloads({
userDataPath,
downloads: Array.from(orphanedDownloads),