From 4fa2aba5b87221725ff2af4f050b4758ff80e112 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Wed, 21 Jan 2015 19:13:57 -0800 Subject: [PATCH] Don't try to free non-temp dirs --- tools/tropohouse.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.