Comparing version 0.7.0 to 0.7.1
10
index.js
@@ -72,3 +72,3 @@ var fs = require('fs'); | ||
watch.createMonitor( | ||
dir, | ||
this.root, | ||
{ interval: opts.interval || DEFAULT_DELAY , filter: this.filter }, | ||
@@ -78,5 +78,5 @@ this.initPoller.bind(this) | ||
} else { | ||
this.watchdir(dir); | ||
this.watchdir(this.root); | ||
recReaddir( | ||
dir, | ||
this.root, | ||
this.watchdir, | ||
@@ -259,2 +259,6 @@ this.register, | ||
Watcher.prototype.detectChangedFile = function(dir, event, callback) { | ||
if (!this.dirRegistery[dir]) { | ||
throw new Error('Unable to find directory in registery: ' + dir); | ||
} | ||
var found = false; | ||
@@ -261,0 +265,0 @@ var closest = {mtime: 0}; |
{ | ||
"name": "sane", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Sane aims to be fast, small, and reliable file system watcher.", | ||
"main": "index.js", | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "https://github.com/amasad/sane.git" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/amasad/sane" | ||
}, | ||
@@ -35,6 +35,2 @@ "scripts": { | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/amasad/sane" | ||
}, | ||
"bugs": { | ||
@@ -41,0 +37,0 @@ "url": "https://github.com/amasad/sane/issues" |
@@ -105,2 +105,3 @@ var os = require('os'); | ||
var i = 0; | ||
var added = false; | ||
@@ -110,2 +111,6 @@ this.watcher.on('all', function(type, filepath, dir) { | ||
if (type === 'change') { | ||
// Windows emits additional change events for newly created files. | ||
if (added && filepath === path.relative(dir, toAdd)) { | ||
return; | ||
} | ||
assert.equal(filepath, path.relative(dir, toChange)); | ||
@@ -116,2 +121,3 @@ } else if (type === 'delete') { | ||
assert.equal(filepath, path.relative(dir, toAdd)); | ||
added = true; | ||
} | ||
@@ -118,0 +124,0 @@ if (++i === 3) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21854
653
5