mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
* 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/trunk@14807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9be166025a
commit
4758d556c9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user