Skip to content

Commit

Permalink
Fix issue with .close(), fs.watch, persistent=false
Browse files Browse the repository at this point in the history
Resolves gh-274
Resolves brunch/brunch#956
  • Loading branch information
es128 committed Apr 8, 2015
1 parent f617546 commit d58c7ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/nodefs-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ function setFsWatchListener(path, fullPath, options, handlers) {
var errHandler = handlers.errHandler;
var rawEmitter = handlers.rawEmitter;
var container = FsWatchInstances[fullPath];
var watcher;
if (!options.persistent) {
return createFsWatchInstance(
watcher = createFsWatchInstance(
path, options, listener, errHandler, rawEmitter
);
} else if (!container) {
return watcher.close.bind(watcher);
}
if (!container) {
var watcher = createFsWatchInstance(
path,
options,
Expand Down

0 comments on commit d58c7ce

Please sign in to comment.