Socket
Socket
Sign inDemoInstall

tar

Package Overview
Dependencies
Maintainers
7
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

lib/strip-absolute-path.js

9

lib/unpack.js

@@ -11,2 +11,3 @@ 'use strict'

const wc = require('./winchars.js')
const stripAbsolutePath = require('./strip-absolute-path.js')

@@ -140,6 +141,6 @@ const ONENTRY = Symbol('onEntry')

// so we only need to test this one to get both
if (path.win32.isAbsolute(p)) {
const parsed = path.win32.parse(p)
this.warn('stripping ' + parsed.root + ' from absolute path', p)
entry.path = p.substr(parsed.root.length)
const s = stripAbsolutePath(p)
if (s[0]) {
entry.path = s[1]
this.warn(`stripping ${s[0]} from absolute path`, p)
}

@@ -146,0 +147,0 @@ }

@@ -27,2 +27,3 @@ 'use strict'

const winchars = require('./winchars.js')
const stripAbsolutePath = require('./strip-absolute-path.js')

@@ -51,8 +52,8 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {

if (!this.preservePaths && path.win32.isAbsolute(p)) {
// absolutes on posix are also absolutes on win32
// so we only need to test this one to get both
const parsed = path.win32.parse(p)
this.warn('stripping ' + parsed.root + ' from absolute path', p)
this.path = p.substr(parsed.root.length)
if (!this.preservePaths) {
const s = stripAbsolutePath(this.path)
if (s[0]) {
this.path = s[1]
this.warn('stripping ' + s[0] + ' from absolute path', p)
}
}

@@ -325,9 +326,11 @@

if (path.isAbsolute(this.path) && !this.preservePaths) {
const parsed = path.parse(this.path)
this.warn(
'stripping ' + parsed.root + ' from absolute path',
this.path
)
this.path = this.path.substr(parsed.root.length)
if (!this.preservePaths) {
const s = stripAbsolutePath(this.path)
if (s[0]) {
this.warn(
'stripping ' + s[0] + ' from absolute path',
this.path
)
this.path = s[1]
}
}

@@ -334,0 +337,0 @@

@@ -5,3 +5,6 @@ {

"description": "tar for node",
"version": "3.2.1",
"version": "3.2.2",
"publishConfig": {
"tag": "v3-legacy"
},
"repository": {

@@ -8,0 +11,0 @@ "type": "git",

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