Fix for a path issue with non flattened source files in jake

This commit is contained in:
Ross Boucher committed 2009-12-04 16:47:50 -08:00
1 parent 1e723945f8
commit b26853e4d7
1 file changed
+3 -2
@@ -690,7 +690,8 @@ BundleTask.prototype.defineSourceTasks = function()
var replacedFiles = [],
environmentCompilerFlags = anEnvironment.compilerFlags().join(" ") + " " + compilerFlags,
flattensSources = this.flattensSources(),
basePathLength = directoryInCommon(environmentSources).length;
basePath = directoryInCommon(environmentSources),
basePathLength = basePath.length;
environmentSources.forEach(function(/*String*/ aFilename)
{
@@ -698,7 +699,7 @@ BundleTask.prototype.defineSourceTasks = function()
if (!FILE.exists(aFilename) || FILE.extension(aFilename) !== '.j')
return;
var relativePath = aFilename.substring(basePathLength),
var relativePath = aFilename.substring(basePathLength ? basePathLength + 1 : basePathLength),
compiledEnvironmentSource = FILE.join(sourcesPath, relativePath);
filedir (compiledEnvironmentSource, [aFilename], function()