* insetcite.C (getNatbibLabel): prevent filesystem exception

if the bib file is in a non-readable directory (bug 2782).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14806 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-08-19 10:37:57 +00:00
parent f7557a9294
commit d9e68dc1b2
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2006-08-19 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* 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 <j.spitzmueller@gmx.de>
* insetcite.C (getNatbibLabel): prevent filesystem exception

View File

@ -23,6 +23,7 @@
#include "frontends/controllers/biblio.h"
#include "support/fs_extras.h"
#include "support/lstrings.h"
#include <boost/filesystem/operations.hpp>
@ -70,8 +71,8 @@ string const getNatbibLabel(Buffer const & buffer,
for (vector<string>::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;

View File

@ -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)