test: align archive hardlink guard expectation · openclaw/openclaw@6ad601d
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,6 +11,7 @@ import {
|
11 | 11 | readZipCentralDirectoryEntryCount, |
12 | 12 | resolvePackedRootDir, |
13 | 13 | } from "./archive.js"; |
| 14 | +import type { FsSafeError } from "./fs-safe.js"; |
14 | 15 | |
15 | 16 | const fixtureRootTracker = createSuiteTempRootTracker({ prefix: "openclaw-archive-" }); |
16 | 17 | const directorySymlinkType = process.platform === "win32" ? "junction" : undefined; |
@@ -280,8 +281,8 @@ describe("archive utils", () => {
|
280 | 281 | timeoutMs: ARCHIVE_EXTRACT_TIMEOUT_MS, |
281 | 282 | }), |
282 | 283 | ).rejects.toMatchObject({ |
283 | | -code: "destination-symlink-traversal", |
284 | | -} satisfies Partial<ArchiveSecurityError>); |
| 284 | +code: "hardlink", |
| 285 | +} satisfies Partial<FsSafeError>); |
285 | 286 | } finally { |
286 | 287 | lstatSpy.mockRestore(); |
287 | 288 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。