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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-07-27 18:15:35 +0300
committerGar <gar+gh@danger.computer>2021-07-27 18:15:35 +0300
commitce8fb0f69ae1b3fdd8834cf073d3d30c2bfc7bc6 (patch)
tree194abd83605f2a2cf47d467f6f224ed785fe2a71 /node_modules
parentf5aab1f8878b4e9a6f4d47dddc449e18a190e201 (diff)
tar@6.1.2
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/tar/lib/unpack.js22
-rw-r--r--node_modules/tar/package.json2
2 files changed, 23 insertions, 1 deletions
diff --git a/node_modules/tar/lib/unpack.js b/node_modules/tar/lib/unpack.js
index 216fa71bd..edaf7833c 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 c497349c9..1c82ac729 100644
--- a/node_modules/tar/package.json
+++ b/node_modules/tar/package.json
@@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (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"