From 4cf9386b6b2edcaa7fa73db66f495889f397aacd Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Thu, 11 Jun 2026 16:30:46 +0400 Subject: [PATCH] comment --- src/Simplex/Chat/Library/Internal.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Simplex/Chat/Library/Internal.hs b/src/Simplex/Chat/Library/Internal.hs index 55b52569bb..10238f3a3a 100644 --- a/src/Simplex/Chat/Library/Internal.hs +++ b/src/Simplex/Chat/Library/Internal.hs @@ -747,6 +747,7 @@ receiveViaCompleteFD user fileId RcvFileDescr {fileDescrText, fileDescrComplete} rd <- parseFileDescription fileDescrText let FD.ValidFileDescription FD.FileDescription {size = FD.FileSize encSize, redirect} = rd redirectSize = maybe 0 (\FD.RedirectFileInfo {size = FD.FileSize s} -> toInteger s) redirect + -- for a redirect, encSize is the description blob and redirectSize the final file; take the larger rcvSize = max (toInteger encSize) redirectSize -- 10 MB margin: encryption and chunk-size rounding make the transfer larger than the advertised size maxRcvSize = min expectedFileSize (toInteger FD.maxFileSizeHard) + toInteger (FD.mb 10 :: Int64)