Fix a LaTeX export error that prevents the inclusion of two program listings that differ only by file extension (bug 5681).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28101 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2009-01-11 19:53:48 +00:00
parent e20b555f07
commit fd2a1fc368
2 changed files with 12 additions and 3 deletions

View File

@ -447,10 +447,17 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
}
// write it to a file (so far the complete file)
string const exportfile = changeExtension(incfile, ".tex");
string const mangled =
DocFileName(changeExtension(included_file.absFilename(),".tex")).
string exportfile;
string mangled;
if (type(params()) == LISTINGS) {
exportfile = incfile;
mangled = DocFileName(included_file).mangledFilename();
} else {
exportfile = changeExtension(incfile, ".tex");
mangled = DocFileName(changeExtension(included_file.absFilename(), ".tex")).
mangledFilename();
}
FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath()));
if (!runparams.nice)

View File

@ -97,6 +97,8 @@ What's new
- Fix bug that telephone number and location didn't appear in the output
of letters (bug 5684).
- Fix a LaTeX export error that prevents the inclusion of two program listings
that differ only by file extension (bug 5681).
* USER INTERFACE