fix(windows): preserve drive-root private runtime paths

Join the admitted parent and generated child name without duplicating a drive-root separator. Reuse that name for handle-relative creation and path provenance.

Add native snapshot, readback, and cleanup coverage through the Ghidra dot-prefixed temp fallback, plus a session-root contract regression.

Fixes #1690
This commit is contained in:
morluto
2026-10-11 11:51:39 +08:00
parent a99857df23
commit ee46323b49
3 changed files with 57 additions and 3 deletions
+9
View File
@@ -44,6 +44,15 @@ describe("ghidraSessionRoot", () => {
).toBe(posixBase("Users", "operator"));
});
it("can select a filesystem root when the inherited temp starts with a dot-prefixed element", () => {
expect(
ghidraSessionRoot({
base: posixBase(".Tmp", "scratch"),
platform: "win32",
}),
).toBe(resolve(sep));
});
it.skipIf(!POSIX)("prefers the platform temp directory by default", () => {
expect(
ghidraSessionRoot({ base: posixBase("home", "operator", ".cache") }),