Skip to content

Commit

Permalink
fix _addToWatched() add dir without path.sep
Browse files Browse the repository at this point in the history
  • Loading branch information
wyicwx committed Jun 6, 2016
1 parent 6a916c3 commit f11b761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gaze.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ Gaze.prototype._addToWatched = function (files) {
dirname = helper.markDir(dirname);

// If a new dir is added
if (helper.isDir(file) && !(filepath in this._watched)) {
helper.objectPush(this._watched, filepath, []);
if (helper.isDir(file) && !(dirname in this._watched)) {
helper.objectPush(this._watched, dirname, []);
}

if (file.slice(-1) === '/') { filepath += path.sep; }
Expand Down

0 comments on commit f11b761

Please sign in to comment.