You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tar-fs

Package Overview
Dependencies
Maintainers
2
Versions
71
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

to
3.0.9

49

index.js

@@ -167,15 +167,4 @@ const tar = require('tar-stream')

if (header.type === 'directory') {
stack.push([name, header.mtime])
return mkdirfix(name, {
fs: xfs,
own,
uid: header.uid,
gid: header.gid,
mode: header.mode
}, stat)
}
const dir = path.join(name, '.') === path.join(cwd, '.') ? cwd : path.dirname(name)
const dir = path.dirname(name)
validate(xfs, dir, path.join(cwd, '.'), function (err, valid) {

@@ -185,2 +174,13 @@ if (err) return next(err)

if (header.type === 'directory') {
stack.push([name, header.mtime])
return mkdirfix(name, {
fs: xfs,
own,
uid: header.uid,
gid: header.gid,
mode: header.mode
}, stat)
}
mkdirfix(dir, {

@@ -233,11 +233,15 @@ fs: xfs,

xfs.unlink(name, function () {
const dst = path.join(cwd, path.join('/', header.linkname))
const link = path.join(cwd, path.join('/', header.linkname))
xfs.link(dst, name, function (err) {
if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) {
stream = xfs.createReadStream(dst)
return onfile()
}
fs.realpath(link, function (err, dst) {
if (err || !inCwd(dst)) return next(new Error(name + ' is not a valid hardlink'))
stat(err)
xfs.link(dst, name, function (err) {
if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) {
stream = xfs.createReadStream(dst)
return onfile()
}
stat(err)
})
})

@@ -323,6 +327,7 @@ })

if (name === root) return cb(null, true)
fs.lstat(name, function (err, st) {
if (err && err.code === 'ENOENT') return validate(fs, path.join(name, '..'), root, cb)
else if (err) return cb(err)
cb(null, st.isDirectory())
if (err && err.code !== 'ENOENT' && err.code !== 'EPERM') return cb(err)
if (err || st.isDirectory()) return validate(fs, path.join(name, '..'), root, cb)
cb(null, false)
})

@@ -329,0 +334,0 @@ }

{
"name": "tar-fs",
"version": "3.0.8",
"version": "3.0.9",
"description": "filesystem bindings for tar-stream",

@@ -5,0 +5,0 @@ "dependencies": {