fix: classify future-version ledgers with changed record shape correctly, not as corrupt

Version-check now runs on the parseLedger failure path too, so a v3 blob whose record shape actually changed reports FutureVersion instead of Unreadable, avoiding the corrupt-blob "clear it" advice. Also closes the six minor findings.
This commit is contained in:
2026-07-30 20:25:46 -04:00
parent 45b87dc2ff
commit 6287534454
6 changed files with 67 additions and 22 deletions
+5 -3
View File
@@ -61,9 +61,11 @@ void ReaSamplerSession::recordCreated(const model::Sample& sample,
const tracking::RecordResult result = tracking_.record(rec);
// A rejection means a file exists that nothing attributes to us — invisible
// otherwise, and exactly the gap this ledger exists to close. AlreadyPresent is
// the normal dedup outcome, not a gap.
if (result == tracking::RecordResult::RejectedEmptyPath ||
result == tracking::RecordResult::RejectedAbsolutePath) {
// the normal dedup outcome, not a gap. Written as "anything but the two OK
// outcomes" rather than a rejection whitelist, so a future RecordResult value
// is reported by default instead of silently passing through unrecognized.
if (result != tracking::RecordResult::Recorded &&
result != tracking::RecordResult::AlreadyPresent) {
ShowConsoleMsg(("ReaSampler: could not record the origin of '" +
sample.relativePath +
"' -- the path is empty or absolute. The file is NOT tracked and "