* mu-store-priv: when rebuilding, remove the contacts-cache file, too

This commit is contained in:
djcb 2013-04-07 16:04:49 +03:00
parent f19500a1eb
commit 26b184c710
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include <xapian.h>
#include <cstring>
#include <stdexcept>
#include <unistd.h>
#include "mu-store.h"
#include "mu-contacts.h"
@ -64,6 +65,11 @@ public:
check_set_version ();
if (contacts_path) {
/* when rebuilding, attempt to clear the
* contacts path */
if (rebuild && access (contacts_path, W_OK) == 0)
(void)unlink (contacts_path);
_contacts = mu_contacts_new (contacts_path);
if (!_contacts)
throw MuStoreError (MU_ERROR_FILE,