]> git.lyx.org Git - features.git/commitdiff
Refine fix for #9453
authorEnrico Forestieri <forenr@lyx.org>
Mon, 16 Mar 2015 09:50:02 +0000 (10:50 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 16 Mar 2015 09:55:54 +0000 (10:55 +0100)
It is better to introduce a dummy blank dir in TEXINPUTS rather than
appending a blank at the end. Even if I have checked that this is not
a problem with MikTeX, some other engine (maybe texlive, but I cannot
check) could not ignore this space and take it as the name of a dir.
In this case, TEXINPUTS would not end with an empty element and the
standard search path would not be inserted there.

src/support/filetools.cpp

index 229dd2e1da2b52e487cbc0806a936e3888d9dd28..1f794f2c9ca9e9b82e364b02f8d396dff9a35b3c 100644 (file)
@@ -733,10 +733,11 @@ string latexEnvCmdPrefix(string const & path)
                return "env TEXINPUTS=\"." + sep + texinputs_prefix
                                          + sep + texinputs + "\" ";
        else
-               // NOTE: *any* space in the last string matters! (see bug 9453)
-               return "cmd /d /c set \"TEXINPUTS=."
+               // NOTE: the dummy blank dir is necessary to force the
+               //       QProcess parser to quote the argument (see bug 9453)
+               return "cmd /d /c set \"TEXINPUTS=." + sep + " "
                                                + sep + texinputs_prefix
-                                               + sep + texinputs + " \" & ";
+                                               + sep + texinputs + "\" & ";
 }