commit 11b7b7234e42ad46add882df914037930c6dd438
Author: Enrico Forestieri <[email protected]>
Date: Thu Nov 27 21:59:09 2014 +0100
Fix bug #9342: LaTeX build get stuck for unconventional path name
The reason being that the TEXINPUTS path list was not quoted on Windows.
This was no problem with spaces but some special characters are
interpreted by the shell and can cause problems. In this particular
case, the '&' character was being interpreted as a command separator.
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index 8efa780..f145122 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -703,8 +703,15 @@ string latexEnvCmdPrefix(string const & path)
return "env TEXINPUTS=\"." + sep + texinputs_prefix
+ sep + texinputs + "\" ";
else
- return "cmd /d /c set TEXINPUTS=." + sep + texinputs_prefix
- + sep + texinputs + "&";
+#ifndef USE_QPROCESS
+ return "cmd /d /c set \"TEXINPUTS=."
+ + sep + texinputs_prefix
+ + sep + texinputs + "\"&";
+#else
+ return "cmd /d /c set \"\"\"TEXINPUTS=."
+ + sep + texinputs_prefix
+ + sep + texinputs + "\"\"\"&";
+#endif
}