aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-04-18 16:15:51 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-04-18 16:15:51 +0800
commitff664c121a4c64b04307b6c00566c03d559a8545 (patch)
tree3550a2d74ff0bf6b56004c0c87fbd5ae3c5fe598 /camel/providers
parent2243175b0cff12404b8beb0b14801cec4d7e5304 (diff)
downloadgsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar.gz
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar.bz2
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar.lz
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar.xz
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.tar.zst
gsoc2013-evolution-ff664c121a4c64b04307b6c00566c03d559a8545.zip
If we get a failure, make sure we set an exception.
2002-04-18 Not Zed <NotZed@Ximian.com> * 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
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-local-store.c8
1 files changed, 6 insertions, 2 deletions
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 <camel/camel-text-index.h>
-#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);