Permalink
Browse files

Watch every directory not every files for Windows

  • Loading branch information...
1 parent 3e3fdd8 commit 374e4918285500685ae010bc5c4e4ed7525f03e6 @heycalmdown committed Aug 15, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/supervisor.js
View
@@ -257,10 +257,9 @@ var findAllWatchFiles = function(dir, callback) {
fs.stat(dir, function(err, stats){
if (err) {
util.error('Error retrieving stats for file: ' + dir);
- } else if (isWindows) {
- callback(dir);
} else {
if (stats.isDirectory()) {
+ if (isWindows) callback(dir);
fs.readdir(dir, function(err, fileNames) {
if(err) {
util.error('Error reading path: ' + dir);
@@ -272,7 +271,7 @@ var findAllWatchFiles = function(dir, callback) {
}
});
} else {
- if (dir.match(fileExtensionPattern)) {
+ if (!isWindows && dir.match(fileExtensionPattern)) {
callback(dir);
}
}

2 comments on commit 374e491

Thankyou, this is awesome and works great!

Owner

heycalmdown replied Aug 17, 2012

@axefrog oh, right? thanks for testing. please see what happened at memory footprint of this patch.

Please sign in to comment.