From 54b7920697b206e68c2d249ed488b44ae99c7fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Cruz?= Date: Mon, 29 Apr 2013 16:21:33 +0100 Subject: [PATCH] Small change. --- lib/resolve/resolvers/FsResolver.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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