Permalink
Browse files

Fixed time comparison

  • Loading branch information...
1 parent 768beaa commit 82801acf016e2393a770c60c48e8df24f94c0c19 @stagas committed Aug 24, 2011
Showing with 4 additions and 4 deletions.
  1. +3 −3 nolife.js
  2. +1 −1 package.json
View
@@ -42,7 +42,7 @@ log('watching extensions:', extensions[0] == '.' ? '*' : '.' + extensions.join('
fs.unwatchFile(file)
}
}())
-
+
function kill() {
try {
proc.kill('SIGHUP')
@@ -64,7 +64,7 @@ log('watching extensions:', extensions[0] == '.' ? '*' : '.' + extensions.join('
if (!~extensions.indexOf(path.extname(file).slice(1).toLowerCase()) && !~extensions.indexOf('.')) return
watched.push(file)
fs.watchFile(file, function(curr, prev) {
- if (curr.mtime != prev.mtime) {
+ if (+curr.mtime !== +prev.mtime) {
log('changed:', file)
log('exiting in 2 seconds...')
restart(2000)
@@ -74,7 +74,7 @@ log('watching extensions:', extensions[0] == '.' ? '*' : '.' + extensions.join('
.on('error', function(er, target, stat) {
log('got error ' + er + ' on target ' + target)
})
-
+
log('watching dir:', dirname)
log('starting:', app[2], args.join(' '))
View
@@ -1,6 +1,6 @@
{ "name" : "nolife"
, "description" : "nolife restarts an application if a file changes"
-, "version" : "0.0.2"
+, "version" : "0.0.3"
, "homepage" : "https://github.com/stagas/nolife"
, "author" : "George Stagas <gstagas@gmail.com> (http://stagas.com/)"
, "repository" :

0 comments on commit 82801ac

Please sign in to comment.