Refactor and improve attachment deduping logic.

This commit is contained in:
Greyson Parrelli
2024-03-12 13:38:16 -04:00
committed by Cody Henthorne
parent b7ee6bfcb3
commit 6df1a68213
16 changed files with 1150 additions and 565 deletions

View File

@@ -194,7 +194,7 @@ public class FullBackupImporter extends FullBackupBase {
private static void processAttachment(@NonNull Context context, @NonNull AttachmentSecret attachmentSecret, @NonNull SQLiteDatabase db, @NonNull Attachment attachment, BackupRecordInputStream inputStream)
throws IOException
{
File dataFile = AttachmentTable.newFile(context);
File dataFile = AttachmentTable.newDataFile(context);
Pair<byte[], OutputStream> output = ModernEncryptingPartOutputStream.createFor(attachmentSecret, dataFile, false);
boolean isLegacyTable = SqlUtil.tableExists(db, "part");