Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

passing options to fs.watch.

fix issue #7
  • Loading branch information...
commit 658b628e32363ec055951faaf78d5cc01b1ba048 1 parent 5276072
@yuanchuan authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/watch.js
  2. +1 −1  package.json
View
4 lib/watch.js
@@ -212,13 +212,13 @@ function watch(fpath, options, cb) {
// Once the logged filename matches it then triggers the callback function.
if (is.file(fpath)) {
var parent = path.resolve(fpath, '..');
- fs.watch(parent, function(evt, fname) {
+ fs.watch(parent, options, function(evt, fname) {
if (path.basename(fpath) === fname) {
normalizeCall(fpath, options, cb);
}
}).on('error', catchException);
} else if (is.dir(fpath)) {
- fs.watch(fpath, function(evt, fname) {
+ fs.watch(fpath, options, function(evt, fname) {
if (fname) {
normalizeCall(path.join(fpath, fname), options, cb);
}
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "node-watch"
- , "version": "0.3.3"
+ , "version": "0.3.4"
, "description": "fs.watch() wrapper of Nodejs "
, "url": "https://github.com/yuanchuan/node-watch"
, "author": "yuanchuan <yuanchuan23@gmail.com> (http://yuanchuan.name)"

0 comments on commit 658b628

Please sign in to comment.
Something went wrong with that request. Please try again.