Skip to content

Commit

Permalink
absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
owiber committed Jun 5, 2012
1 parent 20ae6cc commit 4b7c836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/supervisor.js
Expand Up @@ -100,15 +100,15 @@ function run (args) {
if (ignore) { if (ignore) {
var ignoreItems = ignore.split(','); var ignoreItems = ignore.split(',');
ignoreItems.forEach(function (ignoreItem) { ignoreItems.forEach(function (ignoreItem) {
ignoreItem = path.normalize(ignoreItem + '/'); ignoreItem = path.resolve(ignoreItem + '/');
ignoredPaths[ignoreItem] = true; ignoredPaths[ignoreItem] = true;
util.debug("Ignoring directory '" + ignoreItem + "'."); util.debug("Ignoring directory '" + ignoreItem + "'.");
}); });
} }


var watchItems = watch.split(','); var watchItems = watch.split(',');
watchItems.forEach(function (watchItem) { watchItems.forEach(function (watchItem) {
watchItem = path.normalize(watchItem); watchItem = path.resolve(watchItem);
util.debug("Watching directory '" + watchItem + "' for changes."); util.debug("Watching directory '" + watchItem + "' for changes.");
findAllWatchFiles(watchItem, function(f) { findAllWatchFiles(watchItem, function(f) {
watchGivenFile( f, poll_interval ); watchGivenFile( f, poll_interval );
Expand Down Expand Up @@ -217,7 +217,7 @@ function crashWin (event, filename) {
var shouldCrash = true; var shouldCrash = true;
if( event === 'change' ) { if( event === 'change' ) {
if (filename) { if (filename) {
filename = path.normalize(filename); filename = path.resolve(filename);
Object.keys(ignoredPaths).forEach(function (ignorePath) { Object.keys(ignoredPaths).forEach(function (ignorePath) {
if ( filename.indexOf(ignorePath) === 0 ) { if ( filename.indexOf(ignorePath) === 0 ) {
shouldCrash = false; shouldCrash = false;
Expand Down

0 comments on commit 4b7c836

Please sign in to comment.