Fix improper deletion of stickers when restored from backup.

This commit is contained in:
Cody Henthorne
2020-09-08 14:04:14 -04:00
parent 3b925f8674
commit b8c7e86223
4 changed files with 27 additions and 7 deletions

View File

@@ -156,7 +156,7 @@ public class FullBackupImporter extends FullBackupBase {
private static void processSticker(@NonNull Context context, @NonNull AttachmentSecret attachmentSecret, @NonNull SQLiteDatabase db, @NonNull Sticker sticker, BackupRecordInputStream inputStream)
throws IOException
{
File stickerDirectory = context.getDir(AttachmentDatabase.DIRECTORY, Context.MODE_PRIVATE);
File stickerDirectory = context.getDir(StickerDatabase.DIRECTORY, Context.MODE_PRIVATE);
File dataFile = File.createTempFile("sticker", ".mms", stickerDirectory);
Pair<byte[], OutputStream> output = ModernEncryptingPartOutputStream.createFor(attachmentSecret, dataFile, false);