comment
This commit is contained in:
parent
f2b610f114
commit
83ee11fa3f
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.127 2007-10-27 08:39:24 dockes Exp $ (C) 2004 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.128 2007-10-27 16:40:57 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -1202,14 +1202,14 @@ bool Db::needUpdate(const string &filename, const struct stat *stp)
|
|||||||
string pterm = "P" + hash;
|
string pterm = "P" + hash;
|
||||||
string ermsg;
|
string ermsg;
|
||||||
|
|
||||||
// Look for all documents with this path. We need to look at all
|
// We look up the document indexed by the Pterm. This is either
|
||||||
// to set their existence flag. We check the update time on the
|
// the actual document file, or, for a multi-document file, the
|
||||||
// fmtime field which will be identical for all docs inside a
|
// pseudo-doc we create to stand for the file itself.
|
||||||
// multi-document file (we currently always reindex all if the
|
|
||||||
// file changed)
|
// We try twice in case database needs to be reopened.
|
||||||
for (int tries = 0; tries < 2; tries++) {
|
for (int tries = 0; tries < 2; tries++) {
|
||||||
try {
|
try {
|
||||||
// Check the date using the Pterm doc or pseudo-doc
|
// Get the Pterm doc or pseudo-doc
|
||||||
Xapian::PostingIterator docid = m_ndb->db.postlist_begin(pterm);
|
Xapian::PostingIterator docid = m_ndb->db.postlist_begin(pterm);
|
||||||
if (docid == m_ndb->db.postlist_end(pterm)) {
|
if (docid == m_ndb->db.postlist_end(pterm)) {
|
||||||
// If no document exist with this path, we do need update
|
// If no document exist with this path, we do need update
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user