tar 6.1.2 → 6.1.3

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.
Files changed (2) hide show
  1. package/lib/unpack.js +2 -0
  2. package/package.json +1 -1
package/lib/unpack.js CHANGED
@@ -205,6 +205,8 @@ class Unpack extends Parser {
205
205
  if (parts.length < this.strip)
206
206
  return false
207
207
  entry.path = parts.slice(this.strip).join('/')
208
+ if (entry.path === '' && entry.type !== 'Directory' && entry.type !== 'GNUDumpDir')
209
+ return false
208
210
 
209
211
  if (entry.type === 'Link') {
210
212
  const linkparts = entry.linkpath.split(/\/|\\/)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
3
3
  "name": "tar",
4
4
  "description": "tar for node",
5
- "version": "6.1.2",
5
+ "version": "6.1.3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/npm/node-tar.git"