Comparing version 1.4.0 to 1.4.1
@@ -92,2 +92,4 @@ var tar = require('tar-stream') | ||
header = map(header) || header | ||
if (stat.isDirectory()) { | ||
@@ -112,4 +114,2 @@ header.size = 0 | ||
header = map(header) || header | ||
var entry = pack.entry(header, onnextentry) | ||
@@ -116,0 +116,0 @@ if (!entry) return |
{ | ||
"name": "tar-fs", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -129,2 +129,27 @@ var test = require('tape') | ||
test('map + dir + permissions', function(t) { | ||
t.plan(2) | ||
var a = path.join(__dirname, 'fixtures', 'b') | ||
var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms') | ||
rimraf.sync(b) | ||
var aWithMode = function(header) { | ||
if(header.name === 'a') { | ||
header.mode = 0700; | ||
} | ||
return header | ||
}; | ||
tar.pack(a) | ||
.pipe(tar.extract(b, {map:aWithMode})) | ||
.on('finish', function() { | ||
var files = fs.readdirSync(b).sort() | ||
var stat = fs.statSync(path.join(b, 'a')); | ||
t.same(files.length, 1) | ||
t.same(stat.mode & 0777, 0700) | ||
}) | ||
}); | ||
test('specific entries', function(t) { | ||
@@ -131,0 +156,0 @@ t.plan(6) |
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
16598
348