1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 19:12:26 +01:00

change to our internal CWD before executing external commands

This commit is contained in:
Doug Kearns
2008-10-02 10:59:20 +00:00
parent ba94b70bf2
commit d3c561dc8f

View File

@@ -712,9 +712,11 @@ lookup:
return ""; return "";
if (WINDOWS) if (WINDOWS)
command += " > " + stdoutFile.path + " 2> " + stderrFile.path; command = "cd /D " + cwd + " && " + command + " > " + stdoutFile.path + " 2> " + stderrFile.path;
else 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; var stdinFile = null;