Refine fix for #9453

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.
This commit is contained in:
Enrico Forestieri 2015-03-16 10:50:02 +01:00
parent 06776f2c8f
commit 1af2242c7e

View 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 + "\" & ";
}