diff --git a/glob.js b/glob.js index 4dba04ad..abdee003 100644 --- a/glob.js +++ b/glob.js @@ -237,6 +237,9 @@ Glob.prototype._realpathSet = function (index, cb) { set[real] = true else if (er.syscall === 'stat') set[p] = true + else if (er.code === 'ELOOP') { + if (real) set[real] = true + } else self.emit('error', er) // srsly wtf right here diff --git a/sync.js b/sync.js index 301577ab..644df4a6 100644 --- a/sync.js +++ b/sync.js @@ -62,6 +62,9 @@ GlobSync.prototype._finish = function () { } catch (er) { if (er.syscall === 'stat') set[self._makeAbs(p)] = true + else if (er.code === 'ELOOP') { + if (real) set[real] = true + } else throw er }