From ce8fb0f69ae1b3fdd8834cf073d3d30c2bfc7bc6 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 27 Jul 2021 08:15:35 -0700 Subject: [PATCH] tar@6.1.2 --- node_modules/tar/lib/unpack.js | 22 ++++++++++++++++++++++ node_modules/tar/package.json | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/node_modules/tar/lib/unpack.js b/node_modules/tar/lib/unpack.js index 216fa71bd6a48..edaf7833cdb5b 100644 --- a/node_modules/tar/lib/unpack.js +++ b/node_modules/tar/lib/unpack.js @@ -465,6 +465,19 @@ class Unpack extends Parser { } [CHECKFS2] (entry, done) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + if (entry.type !== 'Directory') { + for (const path of this.dirCache.keys()) { + if (path === entry.absolute || + path.indexOf(entry.absolute + '/') === 0 || + path.indexOf(entry.absolute + '\\') === 0) + this.dirCache.delete(path) + } + } + this[MKDIR](path.dirname(entry.absolute), this.dmode, er => { if (er) { done() @@ -529,6 +542,15 @@ class Unpack extends Parser { class UnpackSync extends Unpack { [CHECKFS] (entry) { + if (entry.type !== 'Directory') { + for (const path of this.dirCache.keys()) { + if (path === entry.absolute || + path.indexOf(entry.absolute + '/') === 0 || + path.indexOf(entry.absolute + '\\') === 0) + this.dirCache.delete(path) + } + } + const er = this[MKDIR](path.dirname(entry.absolute), this.dmode, neverCalled) if (er) return this[ONERROR](er, entry) diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json index c497349c9397c..1c82ac7291631 100644 --- a/node_modules/tar/package.json +++ b/node_modules/tar/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "tar", "description": "tar for node", - "version": "6.1.1", + "version": "6.1.2", "repository": { "type": "git", "url": "https://github.com/npm/node-tar.git" diff --git a/package-lock.json b/package-lock.json index 5554e8fb85af2..f9ff69494150a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -144,7 +144,7 @@ "rimraf": "^3.0.2", "semver": "^7.3.5", "ssri": "^8.0.1", - "tar": "^6.1.1", + "tar": "^6.1.2", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^1.0.4", @@ -9456,9 +9456,9 @@ } }, "node_modules/tar": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.1.tgz", - "integrity": "sha512-GG0R7yt/CQkvG4fueXDi52Zskqxe2AyRJ+Wm54yqarnBgcX3qRIWh10qLVAAN+mlPFGTfP5UxvD3Fbi11UOTUQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.2.tgz", + "integrity": "sha512-EwKEgqJ7nJoS+s8QfLYVGMDmAsj+StbI2AM/RTHeUSsOw6Z8bwNBRv5z3CY0m7laC5qUAqruLX5AhMuc5deY3Q==", "inBundle": true, "dependencies": { "chownr": "^2.0.0", @@ -17396,9 +17396,9 @@ } }, "tar": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.1.tgz", - "integrity": "sha512-GG0R7yt/CQkvG4fueXDi52Zskqxe2AyRJ+Wm54yqarnBgcX3qRIWh10qLVAAN+mlPFGTfP5UxvD3Fbi11UOTUQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.2.tgz", + "integrity": "sha512-EwKEgqJ7nJoS+s8QfLYVGMDmAsj+StbI2AM/RTHeUSsOw6Z8bwNBRv5z3CY0m7laC5qUAqruLX5AhMuc5deY3Q==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", diff --git a/package.json b/package.json index cef491ace151d..98882b27bb053 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "rimraf": "^3.0.2", "semver": "^7.3.5", "ssri": "^8.0.1", - "tar": "^6.1.1", + "tar": "^6.1.2", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^1.0.4",