A bytes file of exactly 64 KiB stays inline: take its exact decoded length (issue 1694)
mesh/merge-gate head 6c857e1c025f merged into trunk b68fc755894c — pass, with a note: builds mesh-sdk (+41 dependent(s)) → ace, g14, novox, shanks; no bus …
mesh/repo-check head 6c857e1c025f merged into trunk b68fc755894c — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/delivery delivering: 0 machine step(s) passed

This commit is contained in:
2026-10-21 14:23:48 +02:00
parent f8a9420952
commit 6c857e1c02
2 changed files with 10 additions and 1 deletions
+3 -1
View File
@@ -85,7 +85,9 @@ func (f *File) TravelsByDigest() bool {
return false
}
if f.Bytes != "" {
return base64.StdEncoding.DecodedLen(len(f.Bytes)) > FileReferenceThreshold
// DecodedLen counts padding, so the exact length is taken off the decoded bytes.
body, err := f.Body()
return err == nil && len(body) > FileReferenceThreshold
}
return len(f.Content) > FileReferenceThreshold
}