Comparing version 1.1.0 to 1.2.0
18
index.js
@@ -59,6 +59,7 @@ var tar = require('tar-stream') | ||
var xfs = opts.fs || fs | ||
var ignore = opts.ignore || noop | ||
var ignore = opts.ignore || opts.filter || noop | ||
var map = opts.map || noop | ||
var mapStream = opts.mapStream || echo | ||
var statNext = statAll(xfs, cwd, ignore) | ||
var strict = opts.strict !== false | ||
var pack = tar.pack() | ||
@@ -106,3 +107,6 @@ | ||
if (!stat.isFile()) return pack.destroy(new Error('unsupported type for '+filename)) | ||
if (!stat.isFile()) { | ||
if (strict) return pack.destroy(new Error('unsupported type for '+filename)) | ||
return onnextentry() | ||
} | ||
@@ -145,3 +149,3 @@ header = map(header) || header | ||
var xfs = opts.fs || fs | ||
var ignore = opts.ignore || noop | ||
var ignore = opts.ignore || opts.filter || noop | ||
var map = opts.map || noop | ||
@@ -156,2 +160,3 @@ var mapStream = opts.mapStream || echo | ||
var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 | ||
var strict = opts.strict !== false | ||
@@ -244,4 +249,9 @@ if (opts.strip) map = strip(map, opts.strip) | ||
if (header.type === 'symlink') return onlink() | ||
if (header.type !== 'file') return next(new Error('unsupported type for '+name+' ('+header.type+')')) | ||
if (header.type !== 'file') { | ||
if (strict) return next(new Error('unsupported type for '+name+' ('+header.type+')')) | ||
stream.resume() | ||
return next() | ||
} | ||
onfile() | ||
@@ -248,0 +258,0 @@ }) |
{ | ||
"name": "tar-fs", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -87,2 +87,4 @@ # tar-fs | ||
Set `options.strict` to `false` if you want to ignore errors due to unsupported entry types (like device files) | ||
## Copy a directory | ||
@@ -89,0 +91,0 @@ |
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
14845
307
108