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>2013-09-07 23:19:44 +0400
committerisaacs <i@izs.me>2013-09-07 23:19:44 +0400
commit463a2294087375bd3fcf663d9ed09aa71d226ff3 (patch)
tree82b6fabae400dc7ec56388cabc8d3c21f118317a /node_modules/graceful-fs
parent8f1f3fd82a97cd150a651cd21c88e925894cd4ac (diff)
graceful-fs@2.0.1
Diffstat (limited to 'node_modules/graceful-fs')
-rw-r--r--node_modules/graceful-fs/README.md13
-rw-r--r--node_modules/graceful-fs/graceful-fs.js11
-rw-r--r--node_modules/graceful-fs/package.json8
3 files changed, 16 insertions, 16 deletions
diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md
index 01af3d6b6..eb1a10935 100644
--- a/node_modules/graceful-fs/README.md
+++ b/node_modules/graceful-fs/README.md
@@ -11,10 +11,9 @@ resilient to errors.
graceful-fs:
-* keeps track of how many file descriptors are open, and by default
- limits this to 1024. Any further requests to open a file are put in a
- queue until new slots become available. If 1024 turns out to be too
- much, it decreases the limit further.
+* Queues up `open` and `readdir` calls, and retries them once
+ something closes if there is an EMFILE error from too many file
+ descriptors.
* fixes `lchmod` for Node versions prior to 0.6.2.
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
@@ -25,9 +24,3 @@ graceful-fs:
On Windows, it retries renaming a file for up to one second if `EACCESS`
or `EPERM` error occurs, likely because antivirus software has locked
the directory.
-
-## Configuration
-
-The maximum number of open file descriptors that graceful-fs manages may
-be adjusted by setting `fs.MAX_OPEN` to a different number. The default
-is 1024.
diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js
index a46b5b2a1..1865f92cc 100644
--- a/node_modules/graceful-fs/graceful-fs.js
+++ b/node_modules/graceful-fs/graceful-fs.js
@@ -126,8 +126,15 @@ function Req () {
}
Req.prototype.done = function (er, result) {
- // if an error, and the code is EMFILE, then get in the queue
- if (er && er.code === "EMFILE") {
+ var tryAgain = false
+ if (er) {
+ var code = er.code
+ var tryAgain = code === "EMFILE"
+ if (process.platform === "win32")
+ tryAgain = tryAgain || code === "OK"
+ }
+
+ if (tryAgain) {
this.failures ++
enqueue(this)
} else {
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
index 4766b4b25..1b4a21c75 100644
--- a/node_modules/graceful-fs/package.json
+++ b/node_modules/graceful-fs/package.json
@@ -6,7 +6,7 @@
},
"name": "graceful-fs",
"description": "A drop-in replacement for fs, making various improvements.",
- "version": "2.0.0",
+ "version": "2.0.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@@ -38,11 +38,11 @@
"EACCESS"
],
"license": "BSD",
- "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* keeps track of how many file descriptors are open, and by default\n limits this to 1024. Any further requests to open a file are put in a\n queue until new slots become available. If 1024 turns out to be too\n much, it decreases the limit further.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n\n## Configuration\n\nThe maximum number of open file descriptors that graceful-fs manages may\nbe adjusted by setting `fs.MAX_OPEN` to a different number. The default\nis 1024.\n",
+ "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
},
- "_id": "graceful-fs@2.0.0",
- "_from": "graceful-fs@2"
+ "_id": "graceful-fs@2.0.1",
+ "_from": "graceful-fs@~2.0.0"
}