mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Check the return status of Lexer::setFile().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38778 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ee419218be
commit
08cfe6c46b
@ -873,7 +873,12 @@ Buffer::ReadStatus Buffer::readFile(FileName const & fn)
|
||||
{
|
||||
FileName fname(fn);
|
||||
Lexer lex;
|
||||
lex.setFile(fname);
|
||||
if (!lex.setFile(fname)) {
|
||||
Alert::error(_("File Not Found"),
|
||||
bformat(_("Unable to open file `%1$s'."),
|
||||
from_utf8(fn.absFileName())));
|
||||
return ReadFileNotFound;
|
||||
}
|
||||
|
||||
int file_format;
|
||||
ReadStatus const ret_plf = parseLyXFormat(lex, fn, file_format);
|
||||
|
Loading…
Reference in New Issue
Block a user