Skip to content

Commit

Permalink
Fixes yui#5 - fixed ignorePaths (doesn't fix this issue, it's different)
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed May 10, 2012
1 parent b280258 commit 1f02000
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/utils.js
Expand Up @@ -331,13 +331,19 @@ var validatePaths = function(paths, ignore) {
if (!(ignore instanceof Array)) {
ignore = [ignore];
}
var p = [];
var p = [],
shouldIgnore = false;

paths.forEach(function(v) {
shouldIgnore = false;
ignore.forEach(function(i) {
if (v.indexOf(i) === -1) {
p.push(v);
if (!shouldIgnore && v.indexOf(i) !== -1) {
shouldIgnore = true;
}
});
if (!shouldIgnore) {
p.push(v);
}
});
paths = p;
}
Expand All @@ -348,3 +354,4 @@ var validatePaths = function(paths, ignore) {
Y.validatePaths = validatePaths;

});

0 comments on commit 1f02000

Please sign in to comment.