Skip to content

Commit

Permalink
closes #164 and #235 fix wrong usage of matchBase option of minimatch…
Browse files Browse the repository at this point in the history
…, use relative to watchDirectory path fore matching
  • Loading branch information
kof authored and AvianFlu committed May 4, 2012
1 parent 2a7c477 commit 44c2337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/forever/plugins/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ function watchFilter(fileName) {
return false;
}

fileName = path.relative(this.watchDirectory, fileName);

for (var key in this.watchIgnorePatterns) {
if (minimatch(fileName, this.watchIgnorePatterns[key], { matchBase: this.watchDirectory })) {
if (minimatch(fileName, this.watchIgnorePatterns[key], { matchBase: true })) {
return false;
}
}
Expand Down Expand Up @@ -53,4 +55,4 @@ exports.attach = function () {
}
}
});
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"daemon": "https://github.com/AvianFlu/daemon.node/tarball/master",
"flatiron": "0.1.x",
"microtime": "0.2.x",
"minimatch": "0.0.x",
"minimatch": "0.2.x",
"nconf": "0.5.x",
"nssocket": "0.3.x",
"node-fork": "0.4.x",
Expand Down

0 comments on commit 44c2337

Please sign in to comment.