From a75d4c24ff4217b60cb8d2a3a83231680e4c9034 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 29 Oct 2013 08:36:14 +0100 Subject: [PATCH] fix multiple typos in commit 25c58c7/8ce2914 --- src/index/rclmonprc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index/rclmonprc.cpp b/src/index/rclmonprc.cpp index 624cddea..3cacb241 100644 --- a/src/index/rclmonprc.cpp +++ b/src/index/rclmonprc.cpp @@ -456,11 +456,12 @@ static bool checkfileanddelete(const string& fname) // condition should happen reasonably seldom. // We check for the request file in all possible user config dirs // (usually, there is only the main one) -static bool expeditedIndexingRequested() +static bool expeditedIndexingRequested(RclConfig *conf) { static vector rqfiles; if (rqfiles.empty()) { rqfiles.push_back(path_cat(conf->getConfDir(), "rclmonixnow")); + const char *cp; if ((cp = getenv("RECOLL_CONFTOP"))) { rqfiles.push_back(path_cat(cp, "rclmonixnow")); } @@ -469,7 +470,7 @@ static bool expeditedIndexingRequested() } } bool found = false; - for (vectorconst_iterator it = rqfiles.begin(); + for (vector::const_iterator it = rqfiles.begin(); it != rqfiles.end(); it++) { found = found || checkfileanddelete(*it); } @@ -560,7 +561,7 @@ bool startMonitor(RclConfig *conf, int opts) // Process. We don't do this every time but let the lists accumulate // a little, this saves processing. Start at once if list is big. time_t now = time(0); - if (expeditedIndexingRequested() || + if (expeditedIndexingRequested(conf) || (now - lastixtime > ixinterval) || (deleted.size() + modified.size() > 20)) { lastixtime = now;