Comparing version 1.11.1 to 1.12.0
27
index.js
@@ -79,3 +79,3 @@ var tar = require('tar-stream') | ||
var onlink = function (filename, header) { | ||
var onsymlink = function (filename, header) { | ||
xfs.readlink(path.join(cwd, filename), function (err, linkname) { | ||
@@ -115,3 +115,3 @@ if (err) return pack.destroy(err) | ||
header = map(header) || header | ||
return onlink(filename, header) | ||
return onsymlink(filename, header) | ||
} | ||
@@ -242,3 +242,3 @@ | ||
var onlink = function () { | ||
var onsymlink = function () { | ||
if (win32) return next() // skip symlinks on win for now before it can be tested | ||
@@ -250,2 +250,9 @@ xfs.unlink(name, function () { | ||
var onlink = function () { | ||
if (win32) return next() // skip links on win for now before it can be tested | ||
xfs.unlink(name, function () { | ||
xfs.link(path.resolve(cwd, header.linkname), name, stat) | ||
}) | ||
} | ||
var onfile = function () { | ||
@@ -272,11 +279,13 @@ var ws = xfs.createWriteStream(name) | ||
if (err) return next(err) | ||
if (header.type === 'symlink') return onlink() | ||
if (header.type !== 'file') { | ||
if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')')) | ||
stream.resume() | ||
return next() | ||
switch (header.type) { | ||
case 'file': return onfile() | ||
case 'link': return onlink() | ||
case 'symlink': return onsymlink() | ||
} | ||
onfile() | ||
if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')')) | ||
stream.resume() | ||
next() | ||
}) | ||
@@ -283,0 +292,0 @@ }) |
{ | ||
"name": "tar-fs", | ||
"version": "1.11.1", | ||
"version": "1.12.0", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19799
412