Skip to content

Commit bccb75d

Browse files
committed
fix(desktop): look up the filesystem calls at call time in localRealpath, as the rest of the shell does
1 parent 4aa9612 commit bccb75d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/desktop/src/main/local-realpath.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ interface LocalRealpathFileSystem {
1919
realpath: (path: string) => Promise<string>
2020
}
2121

22-
const NODE_FILE_SYSTEM: LocalRealpathFileSystem = { lstat, readlink, realpath }
22+
/** Looks each call up on `node:fs/promises` when it runs, as every other caller in the shell does. */
23+
const NODE_FILE_SYSTEM: LocalRealpathFileSystem = {
24+
lstat: (path) => lstat(path),
25+
readlink: (path) => readlink(path),
26+
realpath: (path) => realpath(path),
27+
}
2328

2429
/**
2530
* A UNC share (`\\host\share`), a `\\?\` or `\\.\` device path, or an NT `\??\` path: any of them

0 commit comments

Comments
 (0)