fix: preserve binary plist detection with extended magic probe

This commit is contained in:
64579525
2026-10-12 21:02:02 +08:00
parent 7cba3acaa4
commit 071f632e92
+4 -1
View File
@@ -312,7 +312,10 @@ const detectArtifactFormat = async (
return zipPackageFormatForPath(lower) ?? "zip";
}
// Binary plists, including keyed archives, often use other extensions.
if (observed.bytesRead === 8 && magic.equals(Buffer.from("bplist00")))
if (
observed.bytesRead >= 8 &&
magic.subarray(0, 8).equals(Buffer.from("bplist00"))
)
return "plist";
const named = namedArtifactFormat(lower);
if (named !== undefined) return named;