Socket
Socket
Sign inDemoInstall

tar-fs

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar-fs - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

index.js

@@ -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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc