From 26b184c710d85ca24d6bb74c0eebaec39fe75f74 Mon Sep 17 00:00:00 2001 From: djcb Date: Sun, 7 Apr 2013 16:04:49 +0300 Subject: [PATCH] * mu-store-priv: when rebuilding, remove the contacts-cache file, too --- lib/mu-store-priv.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/mu-store-priv.hh b/lib/mu-store-priv.hh index 3990f420..68897045 100644 --- a/lib/mu-store-priv.hh +++ b/lib/mu-store-priv.hh @@ -29,6 +29,7 @@ #include #include #include +#include #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,