graceful-fs
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -256,1 +256,20 @@ // this keeps a queue of opened file descriptors, and will make | ||
} | ||
// on Windows, A/V software can lock the directory, causing this | ||
// to fail with an EACCES or EPERM if the directory contains newly | ||
// 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) | ||
}) | ||
} |
@@ -5,3 +5,3 @@ { | ||
"description": "fs monkey-patching to avoid EMFILE and other problems", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"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
8504
228