Socket
Socket
Sign inDemoInstall

tar-fs

Package Overview
Dependencies
Maintainers
2
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.15.0 to 1.15.1

19

index.js

@@ -0,1 +1,2 @@

var chownr = require('chownr')
var tar = require('tar-stream')

@@ -288,6 +289,10 @@ var pump = require('pump')

stack.push([name, header.mtime])
return mkdirp(name, {fs: xfs}, stat)
return mkdirfix(name, {
fs: xfs, own: own, uid: header.uid, gid: header.gid
}, stat)
}
mkdirp(path.dirname(name), {fs: xfs}, function (err) {
mkdirfix(path.dirname(name), {
fs: xfs, own: own, uid: header.uid, gid: header.gid
}, function (err) {
if (err) return next(err)

@@ -310,1 +315,11 @@

}
function mkdirfix (name, opts, cb) {
mkdirp(name, {fs: opts.xfs}, function (err, made) {
if (!err && made && opts.own) {
chownr(made, opts.uid, opts.gid, cb)
} else {
cb(err)
}
})
}

3

package.json
{
"name": "tar-fs",
"version": "1.15.0",
"version": "1.15.1",
"description": "filesystem bindings for tar-stream",
"dependencies": {
"chownr": "^1.0.1",
"mkdirp": "^0.5.0",

@@ -7,0 +8,0 @@ "pump": "^1.0.0",

@@ -105,4 +105,4 @@ # tar-fs

var extract = tar.extract('./my-directory', {
dmode: 0555, // all dirs and files should be readable
fmode: 0444
dmode: parseInt(555, 8), // all dirs should be readable
fmode: parseInt(444, 8) // all files should be readable
})

@@ -113,2 +113,11 @@ ```

Alternatively you can set `options.readable` and/or `options.writable` to set the dmode and fmode to readable/writable.
``` js
var extract = tar.extract('./my-directory', {
readable: true, // all dirs and files should be readable
writable: true, // all dirs and files should be writable
})
```
Set `options.strict` to `false` if you want to ignore errors due to unsupported entry types (like device files)

@@ -115,0 +124,0 @@

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