From ff664c121a4c64b04307b6c00566c03d559a8545 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 18 Apr 2002 08:15:51 +0000 Subject: If we get a failure, make sure we set an exception. 2002-04-18 Not Zed * providers/local/camel-local-store.c (rename_folder): If we get a failure, make sure we set an exception. * camel-text-index.c (camel_text_index_rename): If the file doesn't exist, just assume it never did, dont return failure. (text_index_rename): Add '.index' to the path name we're using, since we dont get it passed in. svn path=/trunk/; revision=16505 --- camel/providers/local/camel-local-store.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c index 0e7be5f48b..6a51046814 100644 --- a/camel/providers/local/camel-local-store.c +++ b/camel/providers/local/camel-local-store.c @@ -40,7 +40,7 @@ #include "camel-local-folder.h" #include -#define d(x) +#define d(x) /* Returns the class for a CamelLocalStore */ #define CLOCALS_CLASS(so) CAMEL_LOCAL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so)) @@ -323,7 +323,7 @@ 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 && folder->index) { - if (folder->index && camel_index_rename(folder->index, newibex) == -1) + if (camel_index_rename(folder->index, newibex) == -1) goto ibex_failed; } else { /* TODO: camel_text_index_rename should find out if we have an active index itself? */ @@ -354,6 +354,10 @@ summary_failed: } else camel_text_index_rename(newibex, oldibex); ibex_failed: + camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, + _("Could not rename '%s': %s"), + old, strerror(errno)); + CAMEL_STORE_UNLOCK(store, cache_lock); g_free(newibex); g_free(oldibex); -- cgit v1.2.3