commit 1f241dc849e28d9cd9a322dec9c86b72111d5ab0
Author: Tommaso Cucinotta <[email protected]>
Date: Sat May 6 09:21:58 2017 +0200
Revert "Tolerate formats that are not supported by lyx2lyx."
This reverts commit 2f5396c871d51aa9e9b579c17dd9469fc313a732.
---
src/Buffer.cpp | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 3d0f780..58de3b5 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1179,22 +1179,14 @@ Buffer::ReadStatus Buffer::readFile(FileName const & fn)
if (file_format != LYX_FORMAT) {
FileName tmpFile;
ReadStatus ret_clf = convertLyXFormat(fn, tmpFile, file_format);
+ if (ret_clf != ReadSuccess)
+ return ret_clf;
+ ret_clf = readFile(tmpFile);
if (ret_clf == ReadSuccess) {
- ret_clf = readFile(tmpFile);
- if (ret_clf == ReadSuccess) {
- d->file_format = file_format;
- d->need_format_backup = true;
- return ret_clf;
- }
- }
- if (ret_clf != ReadSuccess) {
- int const ret = Alert::prompt(_("Document format
failure"),
- _("Fileformat unrecognized by lyx2lyx. Trying
to load anyway, "
- "but some contents might be lost and LyX
might crash!\n"
- "Would you like to proceed ?"), 0, 1,
_("&No"), _("&Yes"));
- if (ret == 0)
- return ret_clf;
+ d->file_format = file_format;
+ d->need_format_backup = true;
}
+ return ret_clf;
}
// FIXME: InsetInfo needs to know whether the file is under VCS