filewatcher
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -36,5 +36,6 @@ var fs = require('fs') | ||
fs.stat(file, function(err, stat) { | ||
var changed = err || stat.mtime > mtime | ||
if (changed && self.watchers[file]) { | ||
mtime = err ? -1 : stat.mtime | ||
if (!self.watchers[file]) return | ||
if (!stat) return self.emit('change', file, -1) | ||
if (stat.isDirectory() || stat.mtime > mtime) { | ||
mtime = stat.mtime | ||
self.emit('change', file, mtime) | ||
@@ -41,0 +42,0 @@ } |
{ | ||
"name": "filewatcher", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Wrapper around fs.watch with fallback to fs.watchFile", | ||
@@ -5,0 +5,0 @@ "author": "Felix Gnass", |
Sorry, the diff of this file is not supported yet
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
7244
84