* mu-index, mu-store-xapian.cc: activate _remove

This commit is contained in:
Dirk-Jan C. Binnema
2010-01-05 09:08:39 +02:00
parent 4bc30783b1
commit 735cd5d705
3 changed files with 68 additions and 32 deletions

View File

@ -303,10 +303,15 @@ typedef struct _CleanupData CleanupData;
static MuResult
_foreach_doc_cb (const char* path, CleanupData *cudata)
{
MuResult rv;
if (access (path, R_OK) != 0) {
g_message ("not readable: %s; removing",
path);
/* FIXME: delete from db */
g_message ("not readable: %s; removing", path);
rv = mu_store_xapian_remove (cudata->_xapian, path);
if (rv != MU_OK)
return rv; /* something went wrong... bail out */
if (cudata->_stats)
++cudata->_stats->_cleaned_up;
}