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:
authorisaacs <i@izs.me>2012-03-22 01:07:26 +0400
committerisaacs <i@izs.me>2012-03-22 01:16:48 +0400
commit3dca2469f33a267036028eedf39865c223c854d1 (patch)
treea5cb46fb96a5cb658d5879d91f0b95e8a9dea255 /node_modules/graceful-fs
parentf001b7e118ad3d56121919dde3007f556cbd2c6f (diff)
Update graceful-fs to 1.1.7
Diffstat (limited to 'node_modules/graceful-fs')
-rw-r--r--node_modules/graceful-fs/graceful-fs.js19
-rw-r--r--node_modules/graceful-fs/package.json4
2 files changed, 21 insertions, 2 deletions
diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js
index 9207378ed..36e0f844b 100644
--- a/node_modules/graceful-fs/graceful-fs.js
+++ b/node_modules/graceful-fs/graceful-fs.js
@@ -253,3 +253,22 @@ function chownErOk (er) {
if (!er || (!process.getuid || process.getuid() !== 0)
&& (er.code === "EINVAL" || er.code === "EPERM")) return true
}
+
+
+
+// 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)
+ })
+}
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
index c8f01d729..e426579ec 100644
--- a/node_modules/graceful-fs/package.json
+++ b/node_modules/graceful-fs/package.json
@@ -6,7 +6,7 @@
},
"name": "graceful-fs",
"description": "fs monkey-patching to avoid EMFILE and other problems",
- "version": "1.1.6",
+ "version": "1.1.7",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@@ -20,7 +20,7 @@
"name": "isaacs",
"email": "i@izs.me"
},
- "_id": "graceful-fs@1.1.6",
+ "_id": "graceful-fs@1.1.7",
"dependencies": {},
"optionalDependencies": {},
"_engineSupported": true,