diff --git a/lib/resolve/resolvers/FsResolver.js b/lib/resolve/resolvers/FsResolver.js index 78b0fa96..3d8f7076 100644 --- a/lib/resolve/resolvers/FsResolver.js +++ b/lib/resolve/resolvers/FsResolver.js @@ -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; \ No newline at end of file