X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbuffer_funcs.cpp;h=3a480b3e25e62af38d4919242a57a650953bc1b1;hb=c378fede8bd23299bb88c5d4385beb2b43ce5312;hp=6b582b68024e82315136b0c70c9df817f6fd143f;hpb=62ca7f3ae55ad2e0c395cb554d71afab87de1ee3;p=lyx.git diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 6b582b6802..3a480b3e25 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -94,7 +94,7 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty) // Buffer creation is not possible. return 0; } - if (!b->loadLyXFile(filename)) { + if (b->loadLyXFile(filename) != Buffer::ReadSuccess) { // do not save an emergency file when releasing the buffer b->markClean(); theBufferList().release(b); @@ -132,7 +132,7 @@ Buffer * newFile(string const & filename, string const & templatename, tname = makeAbsPath(templatename); if (!tname.empty()) { - if (!b->readFile(tname)) { + if (b->loadThisLyXFile(tname) != Buffer::ReadSuccess) { docstring const file = makeDisplayPath(tname.absFileName(), 50); docstring const text = bformat( _("The specified document template\n%1$s\ncould not be read."), @@ -268,7 +268,7 @@ Buffer * loadIfNeeded(FileName const & fname) // Buffer creation is not possible. return 0; - if (!buffer->loadLyXFile(fname)) { + if (buffer->loadLyXFile(fname) != Buffer::ReadSuccess) { //close the buffer we just opened theBufferList().release(buffer); return 0;