* Buffer::doExport(): return early.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22550 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-01-14 14:09:20 +00:00
parent 59c8ede0a3
commit c15b2f6e1a

View File

@ -2467,9 +2467,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
if (!success) if (!success)
return false; return false;
if (put_in_tempdir) if (put_in_tempdir) {
result_file = tmp_result_file.absFilename(); result_file = tmp_result_file.absFilename();
else { return true;
}
result_file = changeExtension(absFileName(), ext); result_file = changeExtension(absFileName(), ext);
// We need to copy referenced files (e. g. included graphics // We need to copy referenced files (e. g. included graphics
// if format == "dvi") to the result dir. // if format == "dvi") to the result dir.
@ -2479,8 +2481,7 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
CopyStatus status = SUCCESS; CopyStatus status = SUCCESS;
for (vector<ExportedFile>::const_iterator it = files.begin(); for (vector<ExportedFile>::const_iterator it = files.begin();
it != files.end() && status != CANCEL; ++it) { it != files.end() && status != CANCEL; ++it) {
string const fmt = string const fmt = formats.getFormatFromFile(it->sourceName);
formats.getFormatFromFile(it->sourceName);
status = copyFile(fmt, it->sourceName, status = copyFile(fmt, it->sourceName,
makeAbsPath(it->exportName, dest), makeAbsPath(it->exportName, dest),
it->exportName, status == FORCE); it->exportName, status == FORCE);
@ -2501,7 +2502,6 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
message(bformat(_("Document exported as %1$s"), message(bformat(_("Document exported as %1$s"),
formats.prettyName(format))); formats.prettyName(format)));
} }
}
return true; return true;
} }