* mu-index.[ch]: minor changes
This commit is contained in:
@ -54,9 +54,15 @@ mu_index_new (const char *xpath)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* see we need to reindex the database */
|
/* see we need to reindex the database; note, there is a small race-condition
|
||||||
index->_needs_reindex =
|
* here, between mu_index_new and mu_index_run. Maybe do the check in
|
||||||
mu_util_xapian_db_version_up_to_date (xpath) ? FALSE : TRUE;
|
* mu_index_run instead? */
|
||||||
|
if (mu_util_xapian_db_is_empty (xpath))
|
||||||
|
index->_needs_reindex = FALSE;
|
||||||
|
else {
|
||||||
|
index->_needs_reindex =
|
||||||
|
mu_util_xapian_db_version_up_to_date (xpath) ? FALSE : TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
@ -386,7 +392,6 @@ mu_index_cleanup (MuIndex *index, MuIndexStats *stats,
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
mu_index_stats_clear (MuIndexStats *stats)
|
mu_index_stats_clear (MuIndexStats *stats)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
#ifndef __MU_INDEX_H__
|
#ifndef __MU_INDEX_H__
|
||||||
#define __MU_INDEX_H__
|
#define __MU_INDEX_H__
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
#include "mu-result.h" /* for MuResult */
|
#include "mu-result.h" /* for MuResult */
|
||||||
|
|
||||||
/* opaque structure */
|
/* opaque structure */
|
||||||
|
|||||||
Reference in New Issue
Block a user