mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
Fix a BibTeX caching bug. Because we only set the last modified time
when the cache was valid, we did not set it the first time through and so always read the cache twice. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32890 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
473f25bbec
commit
295b84e8fb
@ -1647,18 +1647,16 @@ BiblioInfo const & Buffer::localBibInfo() const
|
|||||||
|
|
||||||
void Buffer::checkBibInfoCache() const
|
void Buffer::checkBibInfoCache() const
|
||||||
{
|
{
|
||||||
if (d->bibinfoCacheValid_) {
|
support::FileNameList const & bibfilesCache = getBibfilesCache();
|
||||||
support::FileNameList const & bibfilesCache = getBibfilesCache();
|
// compare the cached timestamps with the actual ones.
|
||||||
// compare the cached timestamps with the actual ones.
|
support::FileNameList::const_iterator ei = bibfilesCache.begin();
|
||||||
support::FileNameList::const_iterator ei = bibfilesCache.begin();
|
support::FileNameList::const_iterator en = bibfilesCache.end();
|
||||||
support::FileNameList::const_iterator en = bibfilesCache.end();
|
for (; ei != en; ++ ei) {
|
||||||
for (; ei != en; ++ ei) {
|
time_t lastw = ei->lastModified();
|
||||||
time_t lastw = ei->lastModified();
|
time_t prevw = d->bibfileStatus_[*ei];
|
||||||
if (lastw != d->bibfileStatus_[*ei]) {
|
if (lastw != prevw) {
|
||||||
d->bibinfoCacheValid_ = false;
|
d->bibinfoCacheValid_ = false;
|
||||||
d->bibfileStatus_[*ei] = lastw;
|
d->bibfileStatus_[*ei] = lastw;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user