Am I reading this wrong, or have I found a bug?
Angus
void InsetInclude::Validate(LaTeXFeatures & features) const
{
string incfile(params_.cparams.getContents());
string writefile;
Buffer const & b = *params_.buffer;
if (!b.tmppath.empty() && b.niceFile) {
incfile = subst(incfile, '/','@');
writefile = AddName(b.tmppath, incfile);
} else
writefile = getFileName();
if (IsLyXFilename(getFileName()))
writefile = ChangeExtension(writefile, ".sgml");
features.IncludedFiles[include_label] = writefile;
if (isVerbatim())
features.verbatim = true;
// Here we must do the fun stuff...
// Load the file in the include if it needs
// to be loaded:
if (loadIfNeeded()) {
// a file got loaded
- Buffer * tmp = bufferlist.getBuffer(getFileName());
+ Buffer * tmp = bufferlist.getBuffer(incfile);
tmp->validate(features);
}
}