]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.cpp
* There are cases where updateLabels is not called because no
[lyx.git] / src / buffer_funcs.cpp
index 8ca9ea36b36080db684aa0f273739a06c14009b6..eb3eb52349d44c08e501b8823937805974723dcf 100644 (file)
@@ -80,7 +80,14 @@ Buffer * checkAndLoadLyXFile(FileName const & filename)
                return checkAndLoadLyXFile(filename);
        }
 
-       if (filename.isReadableFile()) {
+       if (filename.exists()) {
+               if (!filename.isReadableFile()) {
+                       docstring text = bformat(_("The file %1$s exists but is not "
+                               "readable by the current user."),
+                               from_utf8(filename.absFilename()));
+                       Alert::error(_("File not readable!"), text);
+                       return 0;
+               }
                Buffer * b = theBufferList().newBuffer(filename.absFilename());
                if (!b)
                        // Buffer creation is not possible.