diff --git a/lib/utils.js b/lib/utils.js index a7c4e91..b05f19c 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -118,7 +118,10 @@ exports.makeUncompressFn = StreamClass => { done(); }); }); - } else { // directory + } else if(header.type==='symlink'){ + const fullpath = path.join(destDir, header.name); + fs.symlinkSync(header.linkname,fullpath); + } else{ // directory mkdirp(path.join(destDir, header.name), err => { if (err) return reject(err); stream.resume();