|
a/src/index/fsindexer.cpp |
|
b/src/index/fsindexer.cpp |
|
... |
|
... |
61 |
|
61 |
|
62 |
#ifndef deleteZ
|
62 |
#ifndef deleteZ
|
63 |
#define deleteZ(X) {delete X;X = 0;}
|
63 |
#define deleteZ(X) {delete X;X = 0;}
|
64 |
#endif
|
64 |
#endif
|
65 |
|
65 |
|
|
|
66 |
FsIndexer::FsIndexer(RclConfig *cnf, Rcl::Db *db, DbIxStatusUpdater *updfunc)
|
|
|
67 |
: m_config(cnf), m_db(db), m_updater(updfunc), m_missing(new FIMissingStore)
|
|
|
68 |
{
|
|
|
69 |
m_havelocalfields = m_config->hasNameAnywhere("localfields");
|
|
|
70 |
}
|
66 |
FsIndexer::~FsIndexer() {
|
71 |
FsIndexer::~FsIndexer() {
|
|
|
72 |
delete m_missing;
|
67 |
}
|
73 |
}
|
68 |
|
74 |
|
69 |
bool FsIndexer::init()
|
75 |
bool FsIndexer::init()
|
70 |
{
|
76 |
{
|
71 |
if (m_tdl.empty()) {
|
77 |
if (m_tdl.empty()) {
|
|
... |
|
... |
119 |
return false;
|
125 |
return false;
|
120 |
}
|
126 |
}
|
121 |
}
|
127 |
}
|
122 |
|
128 |
|
123 |
string missing;
|
129 |
string missing;
|
124 |
FileInterner::getMissingDescription(missing);
|
130 |
FileInterner::getMissingDescription(m_missing, missing);
|
125 |
if (!missing.empty()) {
|
131 |
if (!missing.empty()) {
|
126 |
LOGINFO(("FsIndexer::index missing helper program(s):\n%s\n",
|
132 |
LOGINFO(("FsIndexer::index missing helper program(s):\n%s\n",
|
127 |
missing.c_str()));
|
133 |
missing.c_str()));
|
128 |
}
|
134 |
}
|
129 |
m_config->storeMissingHelperDesc(missing);
|
135 |
m_config->storeMissingHelperDesc(missing);
|
|
... |
|
... |
357 |
if (!interner.ok()) {
|
363 |
if (!interner.ok()) {
|
358 |
// no indexing whatsoever in this case. This typically means that
|
364 |
// no indexing whatsoever in this case. This typically means that
|
359 |
// indexallfilenames is not set
|
365 |
// indexallfilenames is not set
|
360 |
return FsTreeWalker::FtwOk;
|
366 |
return FsTreeWalker::FtwOk;
|
361 |
}
|
367 |
}
|
|
|
368 |
interner.setMissingStore(m_missing);
|
362 |
|
369 |
|
363 |
// File name transcoded to utf8 for indexing.
|
370 |
// File name transcoded to utf8 for indexing.
|
364 |
string charset = m_config->getDefCharset(true);
|
371 |
string charset = m_config->getDefCharset(true);
|
365 |
// If this fails, the file name won't be indexed, no big deal
|
372 |
// If this fails, the file name won't be indexed, no big deal
|
366 |
// Note that we used to do the full path here, but I ended up believing
|
373 |
// Note that we used to do the full path here, but I ended up believing
|