fix(artifacts): classify changed admission as integrity failure
This commit is contained in:
@@ -35,11 +35,17 @@ export const openRootArtifact = async (
|
||||
const changed =
|
||||
admission === "inventoried" &&
|
||||
(primary instanceof NonRegularFileReadError ||
|
||||
primary instanceof RegularFileChangedError ||
|
||||
(primary instanceof Error &&
|
||||
"code" in primary &&
|
||||
["ENOENT", "ENOTDIR", "ELOOP", "EISDIR", "ENOTFILE"].includes(
|
||||
String(primary.code),
|
||||
)));
|
||||
[
|
||||
"ENOENT",
|
||||
"ENOTDIR",
|
||||
"ELOOP",
|
||||
"EISDIR",
|
||||
"ENOTFILE",
|
||||
"ESTALE",
|
||||
].includes(String(primary.code))));
|
||||
// Normalize the primary failure before cleanup so failed closes keep both facts.
|
||||
const failure =
|
||||
signal?.aborted === true
|
||||
|
||||
@@ -62,7 +62,7 @@ const largeUniversalTarget = async (
|
||||
bytes.writeUInt32BE(cpu, entry);
|
||||
bytes.writeUInt32BE(offset, entry + 8);
|
||||
bytes.writeUInt32BE(size, entry + 12);
|
||||
bytes.writeUInt32BE(14, entry + 16);
|
||||
bytes.writeUInt32BE(12, entry + 16);
|
||||
bytes.fill(0x11 * (index + 1), offset, offset + size);
|
||||
thinMach(0xfeedfacf, cpu).copy(bytes, offset);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user