Ignore hard links as well

This commit is contained in:
Michael Jackson 2018-05-08 07:48:13 -07:00
parent 8550244376
commit c62661e5a7
1 changed files with 3 additions and 3 deletions

View File

@ -21,8 +21,8 @@ function stripNamePrefix(headers) {
return headers;
}
function ignoreSymlinks(file, headers) {
return headers.type === "symlink";
function ignoreLinks(file, headers) {
return headers.type === "link" || headers.type === "symlink";
}
function extractResponse(response, outputDir) {
@ -30,7 +30,7 @@ function extractResponse(response, outputDir) {
const extract = tar.extract(outputDir, {
readable: true, // All dirs/files should be readable.
map: stripNamePrefix,
ignore: ignoreSymlinks
ignore: ignoreLinks
});
response.body