Skip to content

Commit

Permalink
Fix filtering of vim swap files
Browse files Browse the repository at this point in the history
Path is the whole path, not just the basename, and there is no
advantage to extracting the basename first instead of just adjusting
the regex like this
  • Loading branch information
es128 committed Jan 28, 2015
1 parent 0378508 commit cf085bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ FSWatcher.prototype._throttle = function(action, path, timeout) {
FSWatcher.prototype._isIgnored = function(path, stats) {
if (
this.options.atomic &&
/^\..*\.(sw[px])$|\~$|\.subl.*\.tmp/.test(path)
/\..*\.(sw[px])$|\~$|\.subl.*\.tmp/.test(path)
) return true;
var userIgnored = anymatch(this._globIgnored.concat(this.options.ignored));
return userIgnored([path, stats]);
Expand Down

0 comments on commit cf085bc

Please sign in to comment.