Fix stomped-on assetPathPrefix in addAssetDir

This commit is contained in:
Emily Stark
2013-05-20 22:12:39 -07:00
parent 75d9f04c5d
commit 5c6617660d

View File

@@ -676,7 +676,7 @@ _.extend(ClientTarget.prototype, {
exclude: exclude
};
var walk = function (dir, assetPath) {
var walk = function (dir, assetPathPrefix) {
_.each(fs.readdirSync(dir), function (item) {
// Skip excluded files
var matchesAnExclude = _.any(exclude, function (pattern) {
@@ -686,7 +686,7 @@ _.extend(ClientTarget.prototype, {
return;
var absPath = path.resolve(dir, item);
assetPath = path.join(dir, item);
var assetPath = path.join(assetPathPrefix, item);
if (fs.statSync(absPath).isDirectory()) {
walk(absPath, assetPath);
return;