diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp index ff414b43..cd71e412 100644 --- a/src/common/rclconfig.cpp +++ b/src/common/rclconfig.cpp @@ -991,6 +991,15 @@ string RclConfig::getIdxStatusFile() const } } +string RclConfig::getWebQueueDir() const +{ + string webqueuedir; + if (!getConfParam("webqueuedir", webqueuedir)) + webqueuedir = "~/.recollweb/ToIndex/"; + webqueuedir = path_tildexpand(webqueuedir); + return webqueuedir; +} + vector& RclConfig::getSkippedNames() { if (m_skpnstate.needrecompute()) { @@ -1009,6 +1018,8 @@ vector RclConfig::getSkippedPaths() const // don't do this. skpl.push_back(getDbDir()); skpl.push_back(getConfDir()); + // And the web queue dir + skpl.push_back(getWebQueueDir()); for (vector::iterator it = skpl.begin(); it != skpl.end(); it++) { *it = path_tildexpand(*it); *it = path_canon(*it); diff --git a/src/common/rclconfig.h b/src/common/rclconfig.h index 175193e7..78b42dee 100644 --- a/src/common/rclconfig.h +++ b/src/common/rclconfig.h @@ -155,6 +155,9 @@ class RclConfig { /** Get indexing status file name */ string getIdxStatusFile() const; + /** Get Web Queue directory name */ + string getWebQueueDir() const; + /** Get list of skipped file names for current keydir */ vector& getSkippedNames(); diff --git a/src/index/beaglequeue.cpp b/src/index/beaglequeue.cpp index 1bc613d9..d9da15b8 100644 --- a/src/index/beaglequeue.cpp +++ b/src/index/beaglequeue.cpp @@ -180,11 +180,8 @@ BeagleQueueIndexer::BeagleQueueIndexer(RclConfig *cnf, Rcl::Db *db, : m_config(cnf), m_db(db), m_cache(0), m_updater(updfunc), m_nocacheindex(false) { - if (!m_config->getConfParam("webqueuedir", m_queuedir)) - m_queuedir = "~/.recollweb/ToIndex/"; - m_queuedir = path_tildexpand(m_queuedir); + m_queuedir = m_config->getWebQueueDir(); path_catslash(m_queuedir); - m_cache = new BeagleQueueCache(cnf); } diff --git a/src/index/fsindexer.cpp b/src/index/fsindexer.cpp index bad509d1..cc2f951d 100644 --- a/src/index/fsindexer.cpp +++ b/src/index/fsindexer.cpp @@ -187,7 +187,6 @@ bool FsIndexer::index() } m_walker.setSkippedPaths(m_config->getSkippedPaths()); - m_walker.addSkippedPath(path_tildexpand("~/.beagle")); for (vector::const_iterator it = m_tdl.begin(); it != m_tdl.end(); it++) { LOGDEB(("FsIndexer::index: Indexing %s into %s\n", it->c_str(), @@ -302,7 +301,6 @@ bool FsIndexer::indexFiles(list& files, ConfIndexer::IxFlag flag) // We use an FsTreeWalker just for handling the skipped path/name lists FsTreeWalker walker; walker.setSkippedPaths(m_config->getSkippedPaths()); - m_walker.addSkippedPath(path_tildexpand("~/.beagle")); for (list::iterator it = files.begin(); it != files.end(); ) { LOGDEB2(("FsIndexer::indexFiles: [%s]\n", it->c_str())); diff --git a/src/index/rclmonrcv.cpp b/src/index/rclmonrcv.cpp index 7cecd6a6..89e837da 100644 --- a/src/index/rclmonrcv.cpp +++ b/src/index/rclmonrcv.cpp @@ -209,9 +209,7 @@ void *rclMonRcvRun(void *q) bool doweb = false; lconfig.getConfParam("processwebqueue", &doweb); if (doweb) { - string webqueuedir; - if (!lconfig.getConfParam("webqueuedir", webqueuedir)) - webqueuedir = path_tildexpand("~/.recollweb/ToIndex/"); + string webqueuedir = lconfig.getWebQueueDir(); if (!mon->addWatch(webqueuedir, true)) { LOGERR(("rclMonRcvRun: addwatch (webqueuedir) failed\n")); if (mon->saved_errno != EACCES && mon->saved_errno != ENOENT) diff --git a/src/python/recoll/pyrecoll.cpp b/src/python/recoll/pyrecoll.cpp index 9d199983..75d63ddf 100644 --- a/src/python/recoll/pyrecoll.cpp +++ b/src/python/recoll/pyrecoll.cpp @@ -185,7 +185,7 @@ SearchData_addclause(recoll_SearchDataObject* self, PyObject *args, char *qs = 0; // needs freeing int slack = 0; char *fld = 0; // needs freeing - int dostem = 1; // needs freeing + int dostem = 1; recoll_SearchDataObject *sub = 0; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ses|iesiO!", (char**)kwlist, &tp, "utf-8", &qs, &slack, diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index 81fb31c1..f7ba1b61 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -666,6 +666,7 @@ struct m_timespec { #endif #ifndef CLOCK_REALTIME +typedef int clockid_t; #define CLOCK_REALTIME 1 #endif @@ -675,10 +676,19 @@ struct m_timespec { ((TV).tv_nsec - m_nsecs) / 1000)) #define NANOS(TV) ( (long long)(((TV).tv_sec - m_secs) * 1000000000LL + \ ((TV).tv_nsec - m_nsecs))) - +#ifdef __APPLE__ +#include +#endif static void gettime(clockid_t clk_id, struct timespec *ts) { +#ifdef __APPLE__ + struct timeval tv; + gettimeofday(&tv, 0); + ts->tv_sec = tv.tv_sec; + ts->tv_nsec = tv.tv_usec * 1000; +#else clock_gettime(clk_id, ts); +#endif } ///// End system interface