Permalink
Browse files

Changed fs.watchFile to use new fs.watch API for windows compatibility.

  • Loading branch information...
1 parent e83df42 commit c79dbd4f0750d14a5f17af6cda4fb1f9d6d85510 @dawnerd committed Feb 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/assetmanager.js
View
@@ -111,8 +111,8 @@ module.exports = function assetManager (assets) {
if (file.match(/^https?:\/\//)) {
return;
}
- fs.watchFile(group.path + file, function (old, newFile) {
- if (old.mtime.toString() != newFile.mtime.toString()) {
+ fs.watch(group.path + file, function (event, file) {
+ if (event === 'change') {
self.generateCache(groupName);
}
});

0 comments on commit c79dbd4

Please sign in to comment.