graceful-fs
Advanced tools
Comparing version 4.2.5 to 4.2.6
@@ -176,6 +176,10 @@ var fs = require('fs') | ||
fs.copyFile = copyFile | ||
function copyFile (src, dest, cb) { | ||
return fs$copyFile(src, dest, function (err) { | ||
function copyFile (src, dest, flags, cb) { | ||
if (typeof flags === 'function') { | ||
cb = flags | ||
flags = 0 | ||
} | ||
return fs$copyFile(src, dest, flags, function (err) { | ||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) | ||
enqueue([fs$copyFile, [src, dest, cb]]) | ||
enqueue([fs$copyFile, [src, dest, flags, cb]]) | ||
else { | ||
@@ -182,0 +186,0 @@ if (typeof cb === 'function') |
{ | ||
"name": "graceful-fs", | ||
"description": "A drop-in replacement for fs, making various improvements.", | ||
"version": "4.2.5", | ||
"version": "4.2.6", | ||
"repository": { | ||
@@ -17,3 +17,3 @@ "type": "git", | ||
"postpublish": "git push origin --follow-tags", | ||
"test": "nyc --silent node test.js | tap -", | ||
"test": "nyc --silent node test.js | tap -c -", | ||
"posttest": "nyc report" | ||
@@ -50,4 +50,3 @@ }, | ||
"clone.js" | ||
], | ||
"dependencies": {} | ||
] | ||
} |
@@ -17,8 +17,11 @@ var constants = require('constants') | ||
var chdir = process.chdir | ||
process.chdir = function(d) { | ||
cwd = null | ||
chdir.call(process, d) | ||
// This check is needed until node.js 12 is required | ||
if (typeof process.chdir === 'function') { | ||
var chdir = process.chdir | ||
process.chdir = function (d) { | ||
cwd = null | ||
chdir.call(process, d) | ||
} | ||
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) | ||
} | ||
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) | ||
@@ -25,0 +28,0 @@ module.exports = patch |
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
28583
740