diff --git a/lib/consign.js b/lib/consign.js index e25dfc5..46e4378 100644 --- a/lib/consign.js +++ b/lib/consign.js @@ -127,7 +127,10 @@ Consign.prototype._setLocations = function(parent, entity, push) { */ Consign.prototype._getRelativeTo = function(location) { - return '.' + location.split(this._options.cwd, 2)[1]; + var regexRule = this._options.cwd + '(.+)' + , regex = new RegExp(regexRule,'g') + ; + return '.' + location.split(regex, 2)[1]; }; /**