|
a/src/index/indexer.cpp |
|
b/src/index/indexer.cpp |
|
... |
|
... |
62 |
m_config->setKeyDir(cstr_null);
|
62 |
m_config->setKeyDir(cstr_null);
|
63 |
if (typestorun & IxTFs) {
|
63 |
if (typestorun & IxTFs) {
|
64 |
deleteZ(m_fsindexer);
|
64 |
deleteZ(m_fsindexer);
|
65 |
m_fsindexer = new FsIndexer(m_config, &m_db, m_updater);
|
65 |
m_fsindexer = new FsIndexer(m_config, &m_db, m_updater);
|
66 |
if (!m_fsindexer || !m_fsindexer->index()) {
|
66 |
if (!m_fsindexer || !m_fsindexer->index()) {
|
|
|
67 |
m_db.close();
|
67 |
return false;
|
68 |
return false;
|
68 |
}
|
69 |
}
|
69 |
}
|
70 |
}
|
70 |
|
71 |
|
71 |
if (m_dobeagle && (typestorun & IxTBeagleQueue)) {
|
72 |
if (m_dobeagle && (typestorun & IxTBeagleQueue)) {
|
72 |
deleteZ(m_beagler);
|
73 |
deleteZ(m_beagler);
|
73 |
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
74 |
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
74 |
if (!m_beagler || !m_beagler->index()) {
|
75 |
if (!m_beagler || !m_beagler->index()) {
|
|
|
76 |
m_db.close();
|
75 |
return false;
|
77 |
return false;
|
76 |
}
|
78 |
}
|
77 |
}
|
79 |
}
|
78 |
|
80 |
|
79 |
if (typestorun == IxTAll) {
|
81 |
if (typestorun == IxTAll) {
|
80 |
// Get rid of all database entries that don't exist in the
|
82 |
// Get rid of all database entries that don't exist in the
|
81 |
// filesystem anymore. Only if all *configured* indexers ran.
|
83 |
// filesystem anymore. Only if all *configured* indexers ran.
|
82 |
if (m_updater && !m_updater->update(DbIxStatus::DBIXS_PURGE, string()))
|
84 |
if (m_updater && !m_updater->update(DbIxStatus::DBIXS_PURGE, string())) {
|
|
|
85 |
m_db.close();
|
83 |
return false;
|
86 |
return false;
|
|
|
87 |
}
|
84 |
m_db.purge();
|
88 |
m_db.purge();
|
85 |
}
|
89 |
}
|
86 |
|
90 |
|
87 |
// The close would be done in our destructor, but we want status
|
91 |
// The close would be done in our destructor, but we want status
|
88 |
// here. Makes no sense to check for cancel, we'll have to close
|
92 |
// here. Makes no sense to check for cancel, we'll have to close
|