Fix several bugs in the local backup restore flow.

This commit is contained in:
Alex Hart
2026-03-24 15:39:09 -03:00
committed by Cody Henthorne
parent 089d8a50b2
commit 9941b2d123
9 changed files with 221 additions and 154 deletions

View File

@@ -227,10 +227,11 @@ class EncryptedBackupReader private constructor(
try {
val length = stream.readVarInt32().also { if (it < 0) return null }
val frameBytes: ByteArray = stream.readNBytesOrThrow(length)
return Frame.ADAPTER.decode(frameBytes)
} catch (e: EOFException) {
return null
} catch (e: IOException) {
return read()
}
}