diff --git a/tools/tropohouse.js b/tools/tropohouse.js index 802d07a7b9..c6e9cd25a7 100644 --- a/tools/tropohouse.js +++ b/tools/tropohouse.js @@ -468,7 +468,11 @@ _.extend(exports.Tropohouse.prototype, { // Delete temp directories now (asynchronously). _.each(buildTempDirs, function (buildTempDir) { - files.freeTempDir(buildTempDir); + // On Windows, the first item added to buildTempDir is actually + // not a temporary directory, it's the real package path + if (buildTempDir !== packagePath) { + files.freeTempDir(buildTempDir); + } }); // Clean up old version.