Comparing version 3.2.1 to 3.2.2
@@ -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", |
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
122288
23
2775