diff options
author | isaacs <i@izs.me> | 2012-03-22 01:07:26 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-22 01:16:48 +0400 |
commit | 3dca2469f33a267036028eedf39865c223c854d1 (patch) | |
tree | a5cb46fb96a5cb658d5879d91f0b95e8a9dea255 /node_modules | |
parent | f001b7e118ad3d56121919dde3007f556cbd2c6f (diff) |
Update graceful-fs to 1.1.7
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/graceful-fs/graceful-fs.js | 19 | ||||
-rw-r--r-- | node_modules/graceful-fs/package.json | 4 |
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, |