From 53765807578e4c21c762a6ad372fd4c470185da5 Mon Sep 17 00:00:00 2001 From: David Okeyode Date: Wed, 8 Dec 2021 13:55:25 +0000 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e345130f..8899dff5 100644 --- a/index.js +++ b/index.js @@ -262,7 +262,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) { stream = xfs.createReadStream(srcpath)