Ogg: the budget-spent warning goes last, after the capped warnings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-31 00:54:52 -04:00
co-authored by Claude Opus 5.5
parent ede7a7ead7
commit 6a34f13808
+4 -4
View File
@@ -350,13 +350,13 @@ pub fn open(src: &(impl ByteSource + ?Sized)) -> Result<OggFile> {
if !found_any {
return Err(Error::NotOgg);
}
if scanner.spent() {
// once per file, so it is not subject to the cap on the others
warnings.push("recovery budget spent; the rest of the damaged data was not searched".into());
}
if !partial.is_empty() {
warn(&mut warnings, "file ends inside a packet".into());
}
if scanner.spent() {
// once per file and last, so it is not subject to the cap on the others
warnings.push("recovery budget spent; the rest of the damaged data was not searched".into());
}
Ok(OggFile { streams, warnings })
}