diff options
Diffstat (limited to 'deps/npm/node_modules/tar/lib/header.js')
-rw-r--r-- | deps/npm/node_modules/tar/lib/header.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/npm/node_modules/tar/lib/header.js b/deps/npm/node_modules/tar/lib/header.js index db002e8c18..31cde8b5cb 100644 --- a/deps/npm/node_modules/tar/lib/header.js +++ b/deps/npm/node_modules/tar/lib/header.js @@ -4,6 +4,7 @@ // the data could not be faithfully encoded in a simple header. // (Also, check header.needPax to see if it needs a pax header.) +const Buffer = require('./buffer.js') const types = require('./types.js') const pathModule = require('path') const large = require('./large-numbers.js') @@ -33,9 +34,9 @@ class Header { this.atime = null this.ctime = null - if (Buffer.isBuffer(data)) { + if (Buffer.isBuffer(data)) this.decode(data, off || 0) - } else if (data) + else if (data) this.set(data) } |