Comparing version 4.4.1 to 4.4.2
@@ -15,2 +15,3 @@ 'use strict' | ||
const CHECKFS = Symbol('checkFs') | ||
const ISREUSABLE = Symbol('isReusable') | ||
const MAKEFS = Symbol('makeFs') | ||
@@ -355,2 +356,13 @@ const FILE = Symbol('file') | ||
// Check if we can reuse an existing filesystem entry safely and | ||
// overwrite it, rather than unlinking and recreating | ||
// Windows doesn't report a useful nlink, so we just never reuse entries | ||
[ISREUSABLE] (entry, st) { | ||
return entry.type === 'File' && | ||
!this.unlink && | ||
st.isFile() && | ||
st.nlink <= 1 && | ||
process.platform !== 'win32' | ||
} | ||
// check if a thing is there, and if so, try to clobber it | ||
@@ -365,3 +377,3 @@ [CHECKFS] (entry) { | ||
this[SKIP](entry) | ||
else if (er || (entry.type === 'File' && !this.unlink && st.isFile())) | ||
else if (er || this[ISREUSABLE](entry, st)) | ||
this[MAKEFS](null, entry) | ||
@@ -428,3 +440,3 @@ else if (st.isDirectory()) { | ||
return this[SKIP](entry) | ||
else if (entry.type === 'File' && !this.unlink && st.isFile()) | ||
else if (this[ISREUSABLE](entry, st)) | ||
return this[MAKEFS](null, entry) | ||
@@ -431,0 +443,0 @@ else { |
@@ -5,3 +5,3 @@ { | ||
"description": "tar for node", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"repository": { | ||
@@ -25,3 +25,3 @@ "type": "git", | ||
"mkdirp": "^0.5.0", | ||
"safe-buffer": "^5.1.1", | ||
"safe-buffer": "^5.1.2", | ||
"yallist": "^3.0.2" | ||
@@ -35,5 +35,5 @@ }, | ||
"rimraf": "^2.6.2", | ||
"tap": "^11.1.3", | ||
"tar-fs": "^1.16.0", | ||
"tar-stream": "^1.5.2" | ||
"tap": "^11.1.4", | ||
"tar-fs": "^1.16.2", | ||
"tar-stream": "^1.6.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "license": "ISC", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130022
2888
Updatedsafe-buffer@^5.1.2