Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check if cur.mtime is > prev.mtime. Closes #45

  • Loading branch information...
commit e45f3d9f07130798fd7843837a2799376c178952 1 parent 0d5975d
@fgnass authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 wrapper.js
View
4 wrapper.js
@@ -76,7 +76,7 @@ function watchFile(file, onChange) {
if (watchFileSupported) {
try {
fs.watchFile(file, {interval: 500, persistent: true}, function(cur, prev) {
- if (cur && +cur.mtime !== +prev.mtime) {
+ if (cur && +cur.mtime > +prev.mtime) {
onChange()
}
})
@@ -92,7 +92,7 @@ function watchFile(file, onChange) {
if (ev == 'change') {
fs.stat(file, function(err, cur) {
if (err) throw err
- if (cur.size !== stats.size || +cur.mtime !== +stats.mtime) {
+ if (cur.size !== stats.size || +cur.mtime > +stats.mtime) {
stats = cur
onChange()
}
Please sign in to comment.
Something went wrong with that request. Please try again.