usemtime config variable needs to be global

This commit is contained in:
Jean-Francois Dockes
2014-12-09 15:58:23 +01:00
parent d630cbbaec
commit cd892ee1a7
4 changed files with 10 additions and 13 deletions
+2 -9
View File
@@ -47,8 +47,6 @@
#include "execmd.h"
#include "extrameta.h"
int FsIndexer::o_tstupdusemtime = -1;
using namespace std;
#ifdef IDX_THREADS
@@ -111,12 +109,6 @@ FsIndexer::FsIndexer(RclConfig *cnf, Rcl::Db *db, DbIxStatusUpdater *updfunc)
m_havelocalfields = m_config->hasNameAnywhere("localfields");
m_config->getConfParam("detectxattronly", &m_detectxattronly);
if (o_tstupdusemtime == -1) {
bool b(false);
m_config->getConfParam("testmodifusemtime", &b);
o_tstupdusemtime = b ? 1 : 0;
}
#ifdef IDX_THREADS
m_stableconfig = new RclConfig(*m_config);
m_loglevel = DebugLog::getdbl()->getlevel();
@@ -497,7 +489,8 @@ void FsIndexer::makesig(const struct stat *stp, string& out)
{
char cbuf[100];
sprintf(cbuf, "%lld" "%ld", (long long)stp->st_size,
o_tstupdusemtime ? (long)stp->st_mtime : (long)stp->st_ctime);
o_uptodate_test_use_mtime ?
(long)stp->st_mtime : (long)stp->st_ctime);
out = cbuf;
}
-4
View File
@@ -135,10 +135,6 @@ class FsIndexer : public FsTreeWalkerCB {
// Activate detection of xattr-only document updates. Experimental, so
// needs a config option
bool m_detectxattronly;
// Use mtime instead of ctime for up-to-date tests. This is mostly
// incompatible with xattr indexing, in addition to other
// issues. See recoll.conf comments.
static int o_tstupdusemtime;
#ifdef IDX_THREADS
friend void *FsIndexerDbUpdWorker(void*);