From c809ee5405f073eeef4e16c76e1d20a5426f8be9 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 5 Dec 2026 15:33:44 +0800 Subject: [PATCH] refactor(ntfs): derive attribute coverage from the recorded issue (#16983) --- scripts/verify/baselines/adhoc-completeness-ternary.json | 2 +- src/domain/windows/ntfsMftAttributes.ts | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/verify/baselines/adhoc-completeness-ternary.json b/scripts/verify/baselines/adhoc-completeness-ternary.json index 64470eaf79d..80117b9e2e6 100644 --- a/scripts/verify/baselines/adhoc-completeness-ternary.json +++ b/scripts/verify/baselines/adhoc-completeness-ternary.json @@ -24,5 +24,5 @@ "src/domain/native/elfNoteLayout.ts": 1, "src/domain/webBundleAnalyzerResult.ts": 1, "src/domain/windows/ntfsMft.ts": 1, - "src/domain/windows/ntfsMftAttributes.ts": 2 + "src/domain/windows/ntfsMftAttributes.ts": 1 } diff --git a/src/domain/windows/ntfsMftAttributes.ts b/src/domain/windows/ntfsMftAttributes.ts index 350a949d3a6..ade37e025d4 100644 --- a/src/domain/windows/ntfsMftAttributes.ts +++ b/src/domain/windows/ntfsMftAttributes.ts @@ -525,15 +525,12 @@ const walkMftAttributes = ( } if (!complete && attributeIssue === null) malformed(usedBytes, "Missing attribute end marker"); + const attributeCoverage = attributeIssue === null ? "complete" : "incomplete"; return { fileNameCount, attributeIssue, - fileNameCoverage: - complete && attributeIssue === null && !hasList - ? "complete" - : "incomplete", - attributeCoverage: - complete && attributeIssue === null ? "complete" : "incomplete", + fileNameCoverage: hasList ? "incomplete" : attributeCoverage, + attributeCoverage, }; };