diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 79552044fc..89ac6b3333 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2006-08-19 Jürgen Spitzmüller + + * insetcite.C (getNatbibLabel): prevent filesystem exception + if the bib file is in a non-readable directory (bug 2782). + 2006-08-18 Jürgen Spitzmüller * insetcite.C (getNatbibLabel): prevent filesystem exception diff --git a/src/insets/insetcite.C b/src/insets/insetcite.C index ff2ee37b94..bcc8e1cd7d 100644 --- a/src/insets/insetcite.C +++ b/src/insets/insetcite.C @@ -23,6 +23,7 @@ #include "frontends/controllers/biblio.h" +#include "support/fs_extras.h" #include "support/lstrings.h" #include @@ -70,8 +71,8 @@ string const getNatbibLabel(Buffer const & buffer, for (vector::const_iterator it = bibfilesCache.begin(); it != bibfilesCache.end(); ++ it) { string const f = *it; - if (!fs::exists(f)) { - lyxerr << "Couldn't find bibtex file " << f << endl; + if (!fs::exists(f) || !fs::is_readable(fs::path(f).branch_path())) { + lyxerr << "Couldn't find or read bibtex file " << f << endl; changed = true; } else if (bibfileStatus[f] != fs::last_write_time(f)) { changed = true; diff --git a/status.14x b/status.14x index ef1a6f9dcb..54d656fe7d 100644 --- a/status.14x +++ b/status.14x @@ -36,7 +36,8 @@ What's new - Fix crash when importing LaTeX files with no text (bug 2667) -- Fix crash when a used bibtex file does not exist. +- Fix crash when a used bibtex file is in a non-readable directory + (bug 2782). - Ignore definition of lyxgreyout environment when re-importing a LyX generated LaTeX file (part of bug 2420)