From 11b7b7234e42ad46add882df914037930c6dd438 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 27 Nov 2014 21:59:09 +0100 Subject: [PATCH] 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. --- src/support/filetools.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 8efa780f22..f145122ee8 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 } -- 2.39.2