Skip to content

Commit

Permalink
Fixed linkSync passing unresolved link path to FileSystem.linkSync
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Dec 10, 2024
1 parent 7fe7c44 commit 7cee453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emulation/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export function linkSync(this: V_Context, targetPath: fs.PathLike, linkPath: fs.
if (config.checkAccess && !fs.statSync(path).hasAccess(constants.R_OK, this)) {
throw ErrnoError.With('EACCES', path, 'link');
}
return fs.linkSync(path, linkPath);
return fs.linkSync(path, link.path);
} catch (e) {
throw fixError(e as ErrnoError, { [path]: targetPath, [link.path]: linkPath });
}
Expand Down

0 comments on commit 7cee453

Please sign in to comment.