Delete attachment transfer files after restore or download.

This commit is contained in:
Cody Henthorne
2025-10-29 08:54:49 -04:00
committed by jeffrey-signal
parent ec76372e4d
commit b9e0d9978b
2 changed files with 4 additions and 0 deletions

View File

@@ -352,6 +352,8 @@ class AttachmentDownloadJob private constructor(
SignalDatabase.attachments.clearIncrementalMacsForAttachmentAndAnyDuplicates(attachmentId, attachment.remoteKey, attachment.dataHash)
markFailed(messageId, attachmentId)
}
attachmentFile.delete()
}
@Throws(InvalidAttachmentException::class)

View File

@@ -468,6 +468,8 @@ class RestoreAttachmentJob private constructor(
SignalDatabase.attachments.clearIncrementalMacsForAttachmentAndAnyDuplicates(attachmentId, attachment.remoteKey, attachment.dataHash)
markFailed(attachmentId)
}
attachmentFile.delete()
}
private fun markFailed(attachmentId: AttachmentId) {