Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/tar/lib/read-entry.js')
-rw-r--r--deps/npm/node_modules/tar/lib/read-entry.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/npm/node_modules/tar/lib/read-entry.js b/deps/npm/node_modules/tar/lib/read-entry.js
index 6661cba5ff9..183a6050ba0 100644
--- a/deps/npm/node_modules/tar/lib/read-entry.js
+++ b/deps/npm/node_modules/tar/lib/read-entry.js
@@ -1,5 +1,6 @@
'use strict'
const MiniPass = require('minipass')
+const normPath = require('./normalize-windows-path.js')
const SLURP = Symbol('slurp')
module.exports = class ReadEntry extends MiniPass {
@@ -46,7 +47,7 @@ module.exports = class ReadEntry extends MiniPass {
this.ignore = true
}
- this.path = header.path
+ this.path = normPath(header.path)
this.mode = header.mode
if (this.mode)
this.mode = this.mode & 0o7777
@@ -58,7 +59,7 @@ module.exports = class ReadEntry extends MiniPass {
this.mtime = header.mtime
this.atime = header.atime
this.ctime = header.ctime
- this.linkpath = header.linkpath
+ this.linkpath = normPath(header.linkpath)
this.uname = header.uname
this.gname = header.gname
@@ -93,7 +94,7 @@ module.exports = class ReadEntry extends MiniPass {
// a global extended header, because that's weird.
if (ex[k] !== null && ex[k] !== undefined &&
!(global && k === 'path'))
- this[k] = ex[k]
+ this[k] = k === 'path' || k === 'linkpath' ? normPath(ex[k]) : ex[k]
}
}
}