From 80b83ad3f4233f9f4e35f447e49e5d609c3a191b Mon Sep 17 00:00:00 2001 From: Rohit N B <48172220+rohitnb@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:00:17 +0000 Subject: [PATCH] Fix issue with creating hard links on Windows --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4d674853..2e1ae6d0 100644 --- a/index.js +++ b/index.js @@ -261,7 +261,7 @@ exports.extract = function (cwd, opts) { var onlink = function () { if (win32) return next() // skip links on win for now before it can be tested xfs.unlink(name, function () { - var srcpath = path.join(cwd, path.join('/', header.linkname)) + var srcpath = path.resolve(cwd, header.linkname) xfs.link(srcpath, name, function (err) { if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) {