Simplify logic a bit. (This was meant to be part of a previous

commit.)
This commit is contained in:
Richard Heck 2016-07-10 01:43:19 -04:00
parent d8aab4af9e
commit 2104d41f71

View File

@ -4322,12 +4322,11 @@ Buffer::ExportStatus Buffer::preview(string const & format, bool includeall) con
if (status != ExportSuccess)
return status;
if (previewFile.exists()) {
if (!formats.view(*this, previewFile, format))
return PreviewError;
else
return PreviewSuccess;
}
if (previewFile.exists())
return formats.view(*this, previewFile, format) ?
PreviewSuccess : PreviewError;
// Successful export but no output file?
// Probably a bug in error detection.
LATTEST(status != ExportSuccess);