Merge remote-tracking branch 'origin/main' into feat/2072-ines-container

This commit is contained in:
64579525
2026-10-12 20:56:36 +08:00
88 changed files with 15887 additions and 351 deletions
+2 -2
View File
@@ -179,7 +179,7 @@ const classifyRootFormat = async (
if (hasZipSignature(prefix)) return zipRootPackageFormat(lower);
if (
lower.endsWith(".pkg") &&
prefix.subarray(0, 4).toString("ascii") === "xar!"
prefix.subarray(0, 4).equals(Buffer.from("xar!"))
)
return "pkg";
if (lower.endsWith(".dmg") && (await hasKolyTrailer(handle))) return "dmg";
@@ -199,5 +199,5 @@ const hasKolyTrailer = async (handle: FileHandle): Promise<boolean> => {
if (size < 512) return false;
const trailer = Buffer.alloc(4);
const read = await handle.read(trailer, 0, trailer.length, size - 512);
return read.bytesRead === 4 && trailer.toString("ascii") === "koly";
return read.bytesRead === 4 && trailer.equals(Buffer.from("koly"));
};