mirror of
https://github.com/mollyim/mollyim-android.git
synced 2025-05-12 21:30:39 +01:00
Delete attachments with mismatched size during backup export
Fixes #139
This commit is contained in:
parent
b363ae5d2f
commit
62080cfe92
1 changed files with 2 additions and 4 deletions
|
@ -669,10 +669,8 @@ public class FullBackupExporter extends FullBackupBase {
|
|||
|
||||
long totalWritten = writeStream(in);
|
||||
if (totalWritten != size) {
|
||||
if (totalWritten == 0) {
|
||||
// MOLLY: Quick workaround for zero-sized broken attachments
|
||||
SignalDatabase.attachments().deleteAttachment(attachmentId);
|
||||
}
|
||||
// MOLLY: Quick workaround for broken attachments
|
||||
SignalDatabase.attachments().deleteAttachment(attachmentId);
|
||||
throw new IOException("Size mismatch!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue