From d3c561dc8f317a5bb52b8e26b66e21639fb26b80 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 2 Oct 2008 10:59:20 +0000 Subject: [PATCH] change to our internal CWD before executing external commands --- content/io.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/io.js b/content/io.js index 7c5f4f89..1dd03148 100644 --- a/content/io.js +++ b/content/io.js @@ -712,9 +712,11 @@ lookup: return ""; if (WINDOWS) - command += " > " + stdoutFile.path + " 2> " + stderrFile.path; + command = "cd /D " + cwd + " && " + command + " > " + stdoutFile.path + " 2> " + stderrFile.path; else - command += " > \"" + escapeQuotes(stdoutFile.path) + "\"" + " 2> \"" + escapeQuotes(stderrFile.path) + "\""; + // TODO: should we only attempt the actual command conditionally on a successful cd? + command = "cd " + escapeQuotes(cwd) + "; " + command + " > \"" + escapeQuotes(stdoutFile.path) + "\"" + + " 2> \"" + escapeQuotes(stderrFile.path) + "\""; var stdinFile = null;