Skip to content

Commit f03f332

Browse files
zemadzes128
authored andcommitted
Fix for possible infinite recursion. (#580)
1 parent 2442f7b commit f03f332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ FSWatcher.prototype._getWatchedDir = function(directory) {
470470
if (!(dir in this._watched)) this._watched[dir] = {
471471
_items: Object.create(null),
472472
add: function(item) {
473-
if (item !== '.') this._items[item] = true;
473+
if (item !== '.' && item !== '..') this._items[item] = true;
474474
},
475475
remove: function(item) {
476476
delete this._items[item];

0 commit comments

Comments
 (0)