tar 5.0.9 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/lib/extract.js +3 -4
- package/lib/list.js +3 -4
- package/lib/mkdir.js +49 -56
- package/lib/pack.js +18 -8
- package/lib/path-reservations.js +3 -6
- package/lib/read-entry.js +3 -4
- package/lib/replace.js +1 -2
- package/lib/unpack.js +83 -213
- package/lib/write-entry.js +72 -165
- package/package.json +10 -16
- package/lib/normalize-windows-path.js +0 -8
- package/lib/strip-absolute-path.js +0 -14
- package/lib/strip-trailing-slashes.js +0 -24
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Charge Long
|
|
2
|
+
|
|
3
|
+
## 6.0
|
|
4
|
+
|
|
5
|
+
- Drop support for node 6 and 8
|
|
6
|
+
- fix symlinks and hardlinks on windows being packed with `\`-style path
|
|
7
|
+
targets
|
|
8
|
+
|
|
9
|
+
## 5.0
|
|
10
|
+
|
|
11
|
+
- Address unpack race conditions using path reservations
|
|
12
|
+
- Change large-numbers errors from TypeError to Error
|
|
13
|
+
- Add `TAR_*` error codes
|
|
14
|
+
- do not treat ignored entries as an invalid archive
|
|
15
|
+
- drop support for node v4
|
|
16
|
+
- unpack: conditionally use a file mapping to write files on Windows
|
|
17
|
+
- Set more portable 'mode' value in portable mode
|
|
18
|
+
- Set `portable` gzip option in portable mode
|
|
19
|
+
|
|
20
|
+
## 4.4
|
|
21
|
+
|
|
22
|
+
- Add 'mtime' option to tar creation to force mtime
|
|
23
|
+
- unpack: only reuse file fs entries if nlink = 1
|
|
24
|
+
- unpack: rename before unlinking files on Windows
|
|
25
|
+
- Fix encoding/decoding of base-256 numbers
|
|
26
|
+
- Use `stat` instead of `lstat` when checking CWD
|
|
27
|
+
- Always provide a callback to fs.close()
|
|
28
|
+
|
|
29
|
+
## 4.3
|
|
30
|
+
|
|
31
|
+
- Add 'transform' unpack option
|
|
32
|
+
|
|
33
|
+
## 4.2
|
|
34
|
+
|
|
35
|
+
- Fail when zlib fails
|
|
36
|
+
|
|
37
|
+
## 4.1
|
|
38
|
+
|
|
39
|
+
- Add noMtime flag for tar creation
|
|
40
|
+
|
|
41
|
+
## 4.0
|
|
42
|
+
|
|
43
|
+
- unpack: raise error if cwd is missing or not a dir
|
|
44
|
+
- pack: don't drop dots from dotfiles when prefixing
|
|
45
|
+
|
|
46
|
+
## 3.1
|
|
47
|
+
|
|
48
|
+
- Support `@file.tar` as an entry argument to copy entries from one tar
|
|
49
|
+
file to another.
|
|
50
|
+
- Add `noPax` option
|
|
51
|
+
- `noResume` option for tar.t
|
|
52
|
+
- win32: convert `>|<?:` chars to windows-friendly form
|
|
53
|
+
- Exclude mtime for dirs in portable mode
|
|
54
|
+
|
|
55
|
+
## 3.0
|
|
56
|
+
|
|
57
|
+
- Minipass-based implementation
|
|
58
|
+
- Entirely new API surface, `tar.c()`, `tar.x()` etc., much closer to
|
|
59
|
+
system tar semantics
|
|
60
|
+
- Massive performance improvement
|
|
61
|
+
- Require node 4.x and higher
|
|
62
|
+
|
|
63
|
+
## 0.x, 1.x, 2.x - 2011-2014
|
|
64
|
+
|
|
65
|
+
- fstream-based implementation
|
|
66
|
+
- slow and kinda bad, but better than npm shelling out to the system `tar`
|
package/lib/extract.js
CHANGED
|
@@ -6,7 +6,6 @@ const Unpack = require('./unpack.js')
|
|
|
6
6
|
const fs = require('fs')
|
|
7
7
|
const fsm = require('fs-minipass')
|
|
8
8
|
const path = require('path')
|
|
9
|
-
const stripSlash = require('./strip-trailing-slashes.js')
|
|
10
9
|
|
|
11
10
|
const x = module.exports = (opt_, files, cb) => {
|
|
12
11
|
if (typeof opt_ === 'function')
|
|
@@ -42,7 +41,7 @@ const x = module.exports = (opt_, files, cb) => {
|
|
|
42
41
|
// construct a filter that limits the file entries listed
|
|
43
42
|
// include child entries if a dir is included
|
|
44
43
|
const filesFilter = (opt, files) => {
|
|
45
|
-
const map = new Map(files.map(f => [
|
|
44
|
+
const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
|
|
46
45
|
const filter = opt.filter
|
|
47
46
|
|
|
48
47
|
const mapHas = (file, r) => {
|
|
@@ -56,8 +55,8 @@ const filesFilter = (opt, files) => {
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
opt.filter = filter
|
|
59
|
-
? (file, entry) => filter(file, entry) && mapHas(
|
|
60
|
-
: file => mapHas(
|
|
58
|
+
? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
|
|
59
|
+
: file => mapHas(file.replace(/\/+$/, ''))
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
const extractFileSync = opt => {
|
package/lib/list.js
CHANGED
|
@@ -9,7 +9,6 @@ const Parser = require('./parse.js')
|
|
|
9
9
|
const fs = require('fs')
|
|
10
10
|
const fsm = require('fs-minipass')
|
|
11
11
|
const path = require('path')
|
|
12
|
-
const stripSlash = require('./strip-trailing-slashes.js')
|
|
13
12
|
|
|
14
13
|
const t = module.exports = (opt_, files, cb) => {
|
|
15
14
|
if (typeof opt_ === 'function')
|
|
@@ -55,7 +54,7 @@ const onentryFunction = opt => {
|
|
|
55
54
|
// construct a filter that limits the file entries listed
|
|
56
55
|
// include child entries if a dir is included
|
|
57
56
|
const filesFilter = (opt, files) => {
|
|
58
|
-
const map = new Map(files.map(f => [
|
|
57
|
+
const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
|
|
59
58
|
const filter = opt.filter
|
|
60
59
|
|
|
61
60
|
const mapHas = (file, r) => {
|
|
@@ -69,8 +68,8 @@ const filesFilter = (opt, files) => {
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
opt.filter = filter
|
|
72
|
-
? (file, entry) => filter(file, entry) && mapHas(
|
|
73
|
-
: file => mapHas(
|
|
71
|
+
? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
|
|
72
|
+
: file => mapHas(file.replace(/\/+$/, ''))
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
const listFileSync = opt => {
|
package/lib/mkdir.js
CHANGED
|
@@ -8,7 +8,6 @@ const mkdirp = require('mkdirp')
|
|
|
8
8
|
const fs = require('fs')
|
|
9
9
|
const path = require('path')
|
|
10
10
|
const chownr = require('chownr')
|
|
11
|
-
const normPath = require('./normalize-windows-path.js')
|
|
12
11
|
|
|
13
12
|
class SymlinkError extends Error {
|
|
14
13
|
constructor (symlink, path) {
|
|
@@ -34,20 +33,7 @@ class CwdError extends Error {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
const
|
|
38
|
-
const cSet = (cache, key, val) => cache.set(normPath(key), val)
|
|
39
|
-
|
|
40
|
-
const checkCwd = (dir, cb) => {
|
|
41
|
-
fs.stat(dir, (er, st) => {
|
|
42
|
-
if (er || !st.isDirectory())
|
|
43
|
-
er = new CwdError(dir, er && er.code || 'ENOTDIR')
|
|
44
|
-
cb(er)
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
module.exports = (dir, opt, cb) => {
|
|
49
|
-
dir = normPath(dir)
|
|
50
|
-
|
|
36
|
+
const mkdir = module.exports = (dir, opt, cb) => {
|
|
51
37
|
// if there's any overlap between mask and mode,
|
|
52
38
|
// then we'll need an explicit chmod
|
|
53
39
|
const umask = opt.umask
|
|
@@ -63,13 +49,13 @@ module.exports = (dir, opt, cb) => {
|
|
|
63
49
|
const preserve = opt.preserve
|
|
64
50
|
const unlink = opt.unlink
|
|
65
51
|
const cache = opt.cache
|
|
66
|
-
const cwd =
|
|
52
|
+
const cwd = opt.cwd
|
|
67
53
|
|
|
68
54
|
const done = (er, created) => {
|
|
69
55
|
if (er)
|
|
70
56
|
cb(er)
|
|
71
57
|
else {
|
|
72
|
-
|
|
58
|
+
cache.set(dir, true)
|
|
73
59
|
if (created && doChown)
|
|
74
60
|
chownr(created, uid, gid, er => done(er))
|
|
75
61
|
else if (needChmod)
|
|
@@ -79,17 +65,21 @@ module.exports = (dir, opt, cb) => {
|
|
|
79
65
|
}
|
|
80
66
|
}
|
|
81
67
|
|
|
82
|
-
if (cache &&
|
|
68
|
+
if (cache && cache.get(dir) === true)
|
|
83
69
|
return done()
|
|
84
70
|
|
|
85
71
|
if (dir === cwd)
|
|
86
|
-
return
|
|
72
|
+
return fs.stat(dir, (er, st) => {
|
|
73
|
+
if (er || !st.isDirectory())
|
|
74
|
+
er = new CwdError(dir, er && er.code || 'ENOTDIR')
|
|
75
|
+
done(er)
|
|
76
|
+
})
|
|
87
77
|
|
|
88
78
|
if (preserve)
|
|
89
|
-
return mkdirp(dir, mode, done)
|
|
79
|
+
return mkdirp(dir, {mode}).then(made => done(null, made), done)
|
|
90
80
|
|
|
91
|
-
const sub =
|
|
92
|
-
const parts = sub.split(
|
|
81
|
+
const sub = path.relative(cwd, dir)
|
|
82
|
+
const parts = sub.split(/\/|\\/)
|
|
93
83
|
mkdir_(cwd, parts, mode, cache, unlink, cwd, null, done)
|
|
94
84
|
}
|
|
95
85
|
|
|
@@ -97,19 +87,22 @@ const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => {
|
|
|
97
87
|
if (!parts.length)
|
|
98
88
|
return cb(null, created)
|
|
99
89
|
const p = parts.shift()
|
|
100
|
-
const part =
|
|
101
|
-
if (
|
|
90
|
+
const part = base + '/' + p
|
|
91
|
+
if (cache.get(part))
|
|
102
92
|
return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
|
|
103
93
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
|
|
107
97
|
if (er) {
|
|
98
|
+
if (er.path && path.dirname(er.path) === cwd &&
|
|
99
|
+
(er.code === 'ENOTDIR' || er.code === 'ENOENT'))
|
|
100
|
+
return cb(new CwdError(cwd, er.code))
|
|
101
|
+
|
|
108
102
|
fs.lstat(part, (statEr, st) => {
|
|
109
|
-
if (statEr)
|
|
110
|
-
statEr.path = statEr.path && normPath(statEr.path)
|
|
103
|
+
if (statEr)
|
|
111
104
|
cb(statEr)
|
|
112
|
-
|
|
105
|
+
else if (st.isDirectory())
|
|
113
106
|
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
|
|
114
107
|
else if (unlink)
|
|
115
108
|
fs.unlink(part, er => {
|
|
@@ -128,21 +121,7 @@ const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
|
|
|
128
121
|
}
|
|
129
122
|
}
|
|
130
123
|
|
|
131
|
-
const
|
|
132
|
-
let ok = false
|
|
133
|
-
let code = 'ENOTDIR'
|
|
134
|
-
try {
|
|
135
|
-
ok = fs.statSync(dir).isDirectory()
|
|
136
|
-
} catch (er) {
|
|
137
|
-
code = er.code
|
|
138
|
-
} finally {
|
|
139
|
-
if (!ok)
|
|
140
|
-
throw new CwdError(dir, code)
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
module.exports.sync = (dir, opt) => {
|
|
145
|
-
dir = normPath(dir)
|
|
124
|
+
const mkdirSync = module.exports.sync = (dir, opt) => {
|
|
146
125
|
// if there's any overlap between mask and mode,
|
|
147
126
|
// then we'll need an explicit chmod
|
|
148
127
|
const umask = opt.umask
|
|
@@ -158,51 +137,65 @@ module.exports.sync = (dir, opt) => {
|
|
|
158
137
|
const preserve = opt.preserve
|
|
159
138
|
const unlink = opt.unlink
|
|
160
139
|
const cache = opt.cache
|
|
161
|
-
const cwd =
|
|
140
|
+
const cwd = opt.cwd
|
|
162
141
|
|
|
163
142
|
const done = (created) => {
|
|
164
|
-
|
|
143
|
+
cache.set(dir, true)
|
|
165
144
|
if (created && doChown)
|
|
166
145
|
chownr.sync(created, uid, gid)
|
|
167
146
|
if (needChmod)
|
|
168
147
|
fs.chmodSync(dir, mode)
|
|
169
148
|
}
|
|
170
149
|
|
|
171
|
-
if (cache &&
|
|
150
|
+
if (cache && cache.get(dir) === true)
|
|
172
151
|
return done()
|
|
173
152
|
|
|
174
153
|
if (dir === cwd) {
|
|
175
|
-
|
|
176
|
-
|
|
154
|
+
let ok = false
|
|
155
|
+
let code = 'ENOTDIR'
|
|
156
|
+
try {
|
|
157
|
+
ok = fs.statSync(dir).isDirectory()
|
|
158
|
+
} catch (er) {
|
|
159
|
+
code = er.code
|
|
160
|
+
} finally {
|
|
161
|
+
if (!ok)
|
|
162
|
+
throw new CwdError(dir, code)
|
|
163
|
+
}
|
|
164
|
+
done()
|
|
165
|
+
return
|
|
177
166
|
}
|
|
178
167
|
|
|
179
168
|
if (preserve)
|
|
180
169
|
return done(mkdirp.sync(dir, mode))
|
|
181
170
|
|
|
182
|
-
const sub =
|
|
183
|
-
const parts = sub.split(
|
|
171
|
+
const sub = path.relative(cwd, dir)
|
|
172
|
+
const parts = sub.split(/\/|\\/)
|
|
184
173
|
let created = null
|
|
185
174
|
for (let p = parts.shift(), part = cwd;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (
|
|
175
|
+
p && (part += '/' + p);
|
|
176
|
+
p = parts.shift()) {
|
|
177
|
+
|
|
178
|
+
if (cache.get(part))
|
|
190
179
|
continue
|
|
191
180
|
|
|
192
181
|
try {
|
|
193
182
|
fs.mkdirSync(part, mode)
|
|
194
183
|
created = created || part
|
|
195
|
-
|
|
184
|
+
cache.set(part, true)
|
|
196
185
|
} catch (er) {
|
|
186
|
+
if (er.path && path.dirname(er.path) === cwd &&
|
|
187
|
+
(er.code === 'ENOTDIR' || er.code === 'ENOENT'))
|
|
188
|
+
return new CwdError(cwd, er.code)
|
|
189
|
+
|
|
197
190
|
const st = fs.lstatSync(part)
|
|
198
191
|
if (st.isDirectory()) {
|
|
199
|
-
|
|
192
|
+
cache.set(part, true)
|
|
200
193
|
continue
|
|
201
194
|
} else if (unlink) {
|
|
202
195
|
fs.unlinkSync(part)
|
|
203
196
|
fs.mkdirSync(part, mode)
|
|
204
197
|
created = created || part
|
|
205
|
-
|
|
198
|
+
cache.set(part, true)
|
|
206
199
|
continue
|
|
207
200
|
} else if (st.isSymbolicLink())
|
|
208
201
|
return new SymlinkError(part, part + '/' + parts.join('/'))
|
package/lib/pack.js
CHANGED
|
@@ -54,7 +54,6 @@ const ONDRAIN = Symbol('ondrain')
|
|
|
54
54
|
const fs = require('fs')
|
|
55
55
|
const path = require('path')
|
|
56
56
|
const warner = require('./warn-mixin.js')
|
|
57
|
-
const normPath = require('./normalize-windows-path.js')
|
|
58
57
|
|
|
59
58
|
const Pack = warner(class Pack extends MiniPass {
|
|
60
59
|
constructor (opt) {
|
|
@@ -67,7 +66,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
67
66
|
this.preservePaths = !!opt.preservePaths
|
|
68
67
|
this.strict = !!opt.strict
|
|
69
68
|
this.noPax = !!opt.noPax
|
|
70
|
-
this.prefix =
|
|
69
|
+
this.prefix = (opt.prefix || '').replace(/(\\|\/)+$/, '')
|
|
71
70
|
this.linkCache = opt.linkCache || new Map()
|
|
72
71
|
this.statCache = opt.statCache || new Map()
|
|
73
72
|
this.readdirCache = opt.readdirCache || new Map()
|
|
@@ -134,7 +133,10 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
[ADDTARENTRY] (p) {
|
|
137
|
-
const absolute =
|
|
136
|
+
const absolute = path.resolve(this.cwd, p.path)
|
|
137
|
+
if (this.prefix)
|
|
138
|
+
p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '')
|
|
139
|
+
|
|
138
140
|
// in this case, we don't have to wait for the stat
|
|
139
141
|
if (!this.filter(p.path, p))
|
|
140
142
|
p.resume()
|
|
@@ -150,7 +152,10 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
[ADDFSENTRY] (p) {
|
|
153
|
-
const absolute =
|
|
155
|
+
const absolute = path.resolve(this.cwd, p)
|
|
156
|
+
if (this.prefix)
|
|
157
|
+
p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '')
|
|
158
|
+
|
|
154
159
|
this[QUEUE].push(new PackJob(p, absolute))
|
|
155
160
|
this[PROCESS]()
|
|
156
161
|
}
|
|
@@ -292,8 +297,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
292
297
|
linkCache: this.linkCache,
|
|
293
298
|
statCache: this.statCache,
|
|
294
299
|
noMtime: this.noMtime,
|
|
295
|
-
mtime: this.mtime
|
|
296
|
-
prefix: this.prefix,
|
|
300
|
+
mtime: this.mtime
|
|
297
301
|
}
|
|
298
302
|
}
|
|
299
303
|
|
|
@@ -319,7 +323,10 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
319
323
|
|
|
320
324
|
if (job.readdir)
|
|
321
325
|
job.readdir.forEach(entry => {
|
|
322
|
-
const p =
|
|
326
|
+
const p = this.prefix ?
|
|
327
|
+
job.path.slice(this.prefix.length + 1) || './'
|
|
328
|
+
: job.path
|
|
329
|
+
|
|
323
330
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
|
324
331
|
this[ADDFSENTRY](base + entry)
|
|
325
332
|
})
|
|
@@ -372,7 +379,10 @@ class PackSync extends Pack {
|
|
|
372
379
|
|
|
373
380
|
if (job.readdir)
|
|
374
381
|
job.readdir.forEach(entry => {
|
|
375
|
-
const p =
|
|
382
|
+
const p = this.prefix ?
|
|
383
|
+
job.path.slice(this.prefix.length + 1) || './'
|
|
384
|
+
: job.path
|
|
385
|
+
|
|
376
386
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
|
377
387
|
this[ADDFSENTRY](base + entry)
|
|
378
388
|
})
|
package/lib/path-reservations.js
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
// while still allowing maximal safe parallelization.
|
|
8
8
|
|
|
9
9
|
const assert = require('assert')
|
|
10
|
-
const normPath = require('./normalize-windows-path.js')
|
|
11
|
-
const { join } = require('path')
|
|
12
10
|
|
|
13
11
|
module.exports = () => {
|
|
14
12
|
// path => [function or Set]
|
|
@@ -20,10 +18,10 @@ module.exports = () => {
|
|
|
20
18
|
const reservations = new Map()
|
|
21
19
|
|
|
22
20
|
// return a set of parent dirs for a given path
|
|
21
|
+
const { join } = require('path')
|
|
23
22
|
const getDirs = path =>
|
|
24
|
-
path.split(
|
|
25
|
-
set.length ? set.concat(
|
|
26
|
-
: [path], [])
|
|
23
|
+
join(path).split(/[\\\/]/).slice(0, -1).reduce((set, path) =>
|
|
24
|
+
set.length ? set.concat(join(set[set.length-1], path)) : [path], [])
|
|
27
25
|
|
|
28
26
|
// functions currently running
|
|
29
27
|
const running = new Set()
|
|
@@ -99,7 +97,6 @@ module.exports = () => {
|
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
const reserve = (paths, fn) => {
|
|
102
|
-
paths = paths.map(p => normPath(join(p)).toLowerCase())
|
|
103
100
|
const dirs = new Set(
|
|
104
101
|
paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))
|
|
105
102
|
)
|
package/lib/read-entry.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
const types = require('./types.js')
|
|
3
3
|
const MiniPass = require('minipass')
|
|
4
|
-
const normPath = require('./normalize-windows-path.js')
|
|
5
4
|
|
|
6
5
|
const SLURP = Symbol('slurp')
|
|
7
6
|
module.exports = class ReadEntry extends MiniPass {
|
|
@@ -48,7 +47,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
48
47
|
this.ignore = true
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
this.path =
|
|
50
|
+
this.path = header.path
|
|
52
51
|
this.mode = header.mode
|
|
53
52
|
if (this.mode)
|
|
54
53
|
this.mode = this.mode & 0o7777
|
|
@@ -60,7 +59,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
60
59
|
this.mtime = header.mtime
|
|
61
60
|
this.atime = header.atime
|
|
62
61
|
this.ctime = header.ctime
|
|
63
|
-
this.linkpath =
|
|
62
|
+
this.linkpath = header.linkpath
|
|
64
63
|
this.uname = header.uname
|
|
65
64
|
this.gname = header.gname
|
|
66
65
|
|
|
@@ -93,7 +92,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
93
92
|
// a global extended header, because that's weird.
|
|
94
93
|
if (ex[k] !== null && ex[k] !== undefined &&
|
|
95
94
|
!(global && k === 'path'))
|
|
96
|
-
this[k] =
|
|
95
|
+
this[k] = ex[k]
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
}
|
package/lib/replace.js
CHANGED