aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-30 13:20:50 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-30 13:20:50 +0800
commit613e004309c27c94abd4b7159f430796ae70228a (patch)
treef90e6db60332027255585b17d0d1db07142694b0 /camel/providers
parentaab1b48eaef5314da57ca3771b0cb7c9ae403773 (diff)
downloadgsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.gz
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.bz2
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.lz
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.xz
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.zst
gsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.zip
Dont try to move ibex if we have none.
2001-10-30 <NotZed@Ximian.com> * providers/local/camel-local-store.c (rename_folder): Dont try to move ibex if we have none. svn path=/trunk/; revision=14429
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-local-store.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index 32ca801606..daa70979dc 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -317,10 +317,12 @@ rename_folder(CamelStore *store, const char *old, const char *new, CamelExceptio
/* try to rollback failures, has obvious races */
+ d(printf("local rename folder '%s' '%s'\n", old, new));
+
CAMEL_STORE_LOCK(store, cache_lock);
folder = g_hash_table_lookup(store->folders, old);
if (folder) {
- if (ibex_move(folder->index, newibex) == -1)
+ if (folder->index && ibex_move(folder->index, newibex) == -1)
goto ibex_failed;
} else {
if (xrename(old, new, path, ".ibex", TRUE, ex))
@@ -344,9 +346,10 @@ base_failed:
xrename(new, old, path, ".ev-summary", TRUE, ex);
summary_failed:
- if (folder)
- ibex_move(folder->index, oldibex);
- else
+ if (folder) {
+ if (folder->index)
+ ibex_move(folder->index, oldibex);
+ } else
xrename(new, old, path, ".ibex", TRUE, ex);
ibex_failed: