Skip to content

Commit 1a038ca

Browse files
committed
Check for excluded path before fs.stat
1 parent 54c3658 commit 1a038ca

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/csscomb.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,17 @@ Comb.prototype = {
120120
return vfs.listDir(path).then(function(filenames) {
121121
return vow.all(filenames.map(function(filename) {
122122
var fullname = path + '/' + filename;
123-
return vfs.stat(fullname).then(function(stat) {
124-
if (_this._shouldProcess(fullname)) {
123+
if (_this._shouldProcess(fullname)) {
124+
return vfs.stat(fullname).then(function(stat) {
125125
if (stat.isDirectory()) {
126126
return _this.processDirectory(fullname);
127127
} else if (fullname.match(/\.css$/)) {
128128
return vow.when(_this.processFile(fullname)).then(function(errors) {
129129
if (errors) return errors;
130130
});
131131
}
132-
}
133-
return;
134-
});
132+
});
133+
}
135134
})).then(function(results) {
136135
return [].concat.apply([], results);
137136
});

0 commit comments

Comments
 (0)