diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-03-06 05:25:01 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-03-06 05:25:01 +0300 |
commit | 8885c4dfb618f2838930b5c5149abea300a762d6 (patch) | |
tree | 4b427f2c56e22dc06f90c578884719f89030f56e /node_modules/glob | |
parent | 2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff (diff) |
rimraf@2.3.1
* Glob arguments for better Windows support.
* Handle bad symlinks properly.
* Make maxBusyTries and emfileWait configurable
* Also upgrade to glob@4.4.1
Diffstat (limited to 'node_modules/glob')
-rw-r--r-- | node_modules/glob/glob.js | 19 | ||||
-rw-r--r-- | node_modules/glob/package.json | 19 | ||||
-rw-r--r-- | node_modules/glob/sync.js | 13 |
3 files changed, 37 insertions, 14 deletions
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index 0075c1fb8..e1a5c9ece 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -627,12 +627,23 @@ Glob.prototype._stat = function (f, cb) { } var self = this - var statcb = inflight('stat\0' + abs, statcb_) + var statcb = inflight('stat\0' + abs, lstatcb_) if (statcb) - fs.stat(abs, statcb) + fs.lstat(abs, statcb) - function statcb_ (er, stat) { - self._stat2(f, abs, er, stat, cb) + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } } } diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json index 8c11fbb77..59eff1188 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.4.1", + "version": "4.4.2", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -42,16 +42,16 @@ "benchclean": "bash benchclean.sh" }, "license": "ISC", - "gitHead": "a10b0294183788c0e9f56fc3ac88832e2c3513bc", + "gitHead": "c13abc0df649ec29f8cfec42f818412887736aa1", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.4.1", - "_shasum": "8395b16d01f4a58f0bf3f6359174997b78d74197", - "_from": "glob@>=4.4.1 <4.5.0", + "_id": "glob@4.4.2", + "_shasum": "3ef93e297ee096c1b9b3ffb1d21025c78ab60548", + "_from": "glob@>=4.4.2 <4.5.0", "_npmVersion": "2.6.0", - "_nodeVersion": "1.1.0", + "_nodeVersion": "1.4.2", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -63,9 +63,10 @@ } ], "dist": { - "shasum": "8395b16d01f4a58f0bf3f6359174997b78d74197", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.4.1.tgz" + "shasum": "3ef93e297ee096c1b9b3ffb1d21025c78ab60548", + "tarball": "http://registry.npmjs.org/glob/-/glob-4.4.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.4.1.tgz" + "_resolved": "https://registry.npmjs.org/glob/-/glob-4.4.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js index 7aa0d07c5..315fbfb0b 100644 --- a/node_modules/glob/sync.js +++ b/node_modules/glob/sync.js @@ -391,11 +391,22 @@ GlobSync.prototype._stat = function (f) { var exists var stat = this.statCache[abs] if (!stat) { + var lstat try { - stat = fs.statSync(abs) + lstat = fs.lstatSync(abs) } catch (er) { return false } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } } this.statCache[abs] = stat |