Comparing version 4.4.13 to 4.4.14
@@ -12,2 +12,3 @@ 'use strict' | ||
const wc = require('./winchars.js') | ||
const stripAbsolutePath = require('./strip-absolute-path.js') | ||
@@ -199,6 +200,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) | ||
} | ||
@@ -205,0 +206,0 @@ } |
@@ -29,2 +29,3 @@ 'use strict' | ||
const winchars = require('./winchars.js') | ||
const stripAbsolutePath = require('./strip-absolute-path.js') | ||
@@ -58,8 +59,8 @@ const modeFix = require('./mode-fix.js') | ||
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) | ||
} | ||
} | ||
@@ -348,9 +349,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] | ||
} | ||
} | ||
@@ -357,0 +360,0 @@ |
@@ -5,3 +5,6 @@ { | ||
"description": "tar for node", | ||
"version": "4.4.13", | ||
"version": "4.4.14", | ||
"publishConfig": { | ||
"tag": "v4-legacy" | ||
}, | ||
"repository": { | ||
@@ -8,0 +11,0 @@ "type": "git", |
134215
25
3004
2
0