Fix stupid mistake that led to bug #8574.

(cherry picked from commit e987952664)

Conflicts:
	src/insets/InsetInclude.cpp
This commit is contained in:
Richard Heck 2013-03-04 18:07:48 -05:00
parent 1570604063
commit 6662d6c71d

View File

@ -527,7 +527,27 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
mangledFileName(); mangledFileName();
} }
if (!runparams.nice)
incfile = mangled;
else if (!isValidLaTeXFileName(incfile)) {
frontend::Alert::warning(_("Invalid filename"),
_("The following filename will cause troubles "
"when running the exported file through LaTeX: ") +
from_utf8(incfile));
} else if (!isValidDVIFileName(incfile)) {
frontend::Alert::warning(_("Problematic filename for DVI"),
_("The following filename can cause troubles "
"when running the exported file through LaTeX "
"and opening the resulting DVI: ") +
from_utf8(incfile), true);
}
FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath())); FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath()));
LYXERR(Debug::LATEX, "incfile:" << incfile);
LYXERR(Debug::LATEX, "exportfile:" << exportfile);
LYXERR(Debug::LATEX, "writefile:" << writefile);
string const tex_format = flavor2format(runparams.flavor); string const tex_format = flavor2format(runparams.flavor);
switch (type(params())) { switch (type(params())) {
@ -590,25 +610,6 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
// in a comment or doing a dryrun // in a comment or doing a dryrun
return; return;
if (!runparams.nice)
incfile = mangled;
else if (!isValidLaTeXFileName(incfile)) {
frontend::Alert::warning(_("Invalid filename"),
_("The following filename will cause troubles "
"when running the exported file through LaTeX: ") +
from_utf8(incfile));
}
else if (!isValidDVIFileName(incfile)) {
frontend::Alert::warning(_("Problematic filename for DVI"),
_("The following filename can cause troubles "
"when running the exported file through LaTeX "
"and opening the resulting DVI: ") +
from_utf8(incfile), true);
}
LYXERR(Debug::LATEX, "incfile:" << incfile);
LYXERR(Debug::LATEX, "exportfile:" << exportfile);
LYXERR(Debug::LATEX, "writefile:" << writefile);
if (isInputOrInclude(params()) && if (isInputOrInclude(params()) &&
isLyXFileName(included_file.absFileName())) { isLyXFileName(included_file.absFileName())) {
// if it's a LyX file and we're inputting or including, // if it's a LyX file and we're inputting or including,