]> git.lyx.org Git - features.git/commitdiff
Fix bug #9342: LaTeX build get stuck for unconventional path name
authorEnrico Forestieri <forenr@lyx.org>
Tue, 6 Jan 2015 21:06:46 +0000 (22:06 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 6 Jan 2015 21:06:46 +0000 (22:06 +0100)
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
status.21x

index 92aeaf7fb4c8beeedfacc840c880ab243d5187a1..131e1777675acfdd585d2bc57b51f12b0c05fa17 100644 (file)
@@ -605,8 +605,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
 }
 
 
index 409aa2fa3c36a7305770bcf0701f0128db8c6c64..4dc124782ec0c334ea128bb7a90565e249a9b1dc 100644 (file)
@@ -115,6 +115,9 @@ What's new
 
 - Do not insert a protected space after some math-spaces (bug 9319).
 
+- Fix problem when some special characters appear in the document directory
+  name on Windows (bug 9342).
+
 
 * LYX2LYX