graceful-fs
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -262,14 +262,15 @@ // this keeps a queue of opened file descriptors, and will make | ||
// created files. Try again on failure, for up to 1 second. | ||
var rename_ = fs.rename | ||
fs.rename = function rename (from, to, cb) { | ||
var start = Date.now() | ||
rename_(from, to, function CB (er) { | ||
if (er | ||
&& process.platform === "win32" | ||
&& (er.code === "EACCES" || er.code === "EPERM") | ||
&& Date.now() - start < 1000) { | ||
return rename_(from, to, CB) | ||
} | ||
cb(er) | ||
}) | ||
if (process.platform === "win32") { | ||
var rename_ = fs.rename | ||
fs.rename = function rename (from, to, cb) { | ||
var start = Date.now() | ||
rename_(from, to, function CB (er) { | ||
if (er | ||
&& (er.code === "EACCES" || er.code === "EPERM") | ||
&& Date.now() - start < 1000) { | ||
return rename_(from, to, CB) | ||
} | ||
cb(er) | ||
}) | ||
} | ||
} |
@@ -5,3 +5,3 @@ { | ||
"description": "fs monkey-patching to avoid EMFILE and other problems", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
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
8526
229