Small change.

This commit is contained in:
André Cruz
2013-04-29 16:21:33 +01:00
parent 9ead37845e
commit 54b7920697

View File

@@ -38,11 +38,7 @@ FsResolver.prototype._resolveSelf = function () {
return this._readJson(this._source)
.then(this._copy.bind(this))
.spread(function (stat, file) {
if (stat.isFile() && extract.canExtract(file)) {
return this._extract(file);
}
}.bind(this));
.spread(this._extract.bind(this));
};
// -----------------
@@ -76,8 +72,12 @@ FsResolver.prototype._copy = function (meta) {
}.bind(this));
};
FsResolver.prototype._extract = function (file) {
return extract(file, this._tempDir);
FsResolver.prototype._extract = function (stat, file) {
if (stat.isFile() && extract.canExtract(file)) {
return extract(file, this._tempDir);
}
return Q.resolve();
};
module.exports = FsResolver;