diff options
author | Not Zed <NotZed@Ximian.com> | 2002-03-25 20:11:44 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-03-25 20:11:44 +0800 |
commit | c6fc4e27a953c5213cff8400ec8e40f6f051e914 (patch) | |
tree | 7237e42f705cd584d36f3a2a4795a1bb16741dd3 /camel/providers/local/camel-local-store.c | |
parent | ede63cde5882af8696c22ed546506ad877b73011 (diff) | |
download | gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar.gz gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar.bz2 gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar.lz gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar.xz gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.tar.zst gsoc2013-evolution-c6fc4e27a953c5213cff8400ec8e40f6f051e914.zip |
When we add a new name, up all of the cache limits, because we're probably
2002-03-25 Not Zed <NotZed@Ximian.com>
* camel-text-index.c (text_index_add_name): When we add a new
name, up all of the cache limits, because we're probably going to
be adding more.
(text_index_sync): Drop the cache limits back down again, we dont
need them when looking words up.
** MERGE camel_index branch.
* camel-text-index.[ch]: Added files i forgot to add (eep nearly
lost all this work!)
* camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
svn path=/trunk/; revision=16242
Diffstat (limited to 'camel/providers/local/camel-local-store.c')
-rw-r--r-- | camel/providers/local/camel-local-store.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c index daa70979dc..0e7be5f48b 100644 --- a/camel/providers/local/camel-local-store.c +++ b/camel/providers/local/camel-local-store.c @@ -38,6 +38,7 @@ #include "camel-url.h" #include "camel-local-folder.h" +#include <camel/camel-text-index.h> #define d(x) @@ -321,11 +322,12 @@ rename_folder(CamelStore *store, const char *old, const char *new, CamelExceptio CAMEL_STORE_LOCK(store, cache_lock); folder = g_hash_table_lookup(store->folders, old); - if (folder) { - if (folder->index && ibex_move(folder->index, newibex) == -1) + if (folder && folder->index) { + if (folder->index && camel_index_rename(folder->index, newibex) == -1) goto ibex_failed; } else { - if (xrename(old, new, path, ".ibex", TRUE, ex)) + /* TODO: camel_text_index_rename should find out if we have an active index itself? */ + if (camel_text_index_rename(oldibex, newibex) == -1) goto ibex_failed; } @@ -348,10 +350,9 @@ base_failed: summary_failed: if (folder) { if (folder->index) - ibex_move(folder->index, oldibex); + camel_index_rename(folder->index, oldibex); } else - xrename(new, old, path, ".ibex", TRUE, ex); - + camel_text_index_rename(newibex, oldibex); ibex_failed: CAMEL_STORE_UNLOCK(store, cache_lock); g_free(newibex); @@ -379,7 +380,7 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex) } g_free(str); str = g_strdup_printf("%s.ibex", name); - if (unlink(str) == -1 && errno != ENOENT) { + if (camel_text_index_remove(str) == -1 && errno != ENOENT) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not delete folder index file `%s': %s"), str, strerror(errno)); |