aboutsummaryrefslogtreecommitdiffstats
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
parentaab1b48eaef5314da57ca3771b0cb7c9ae403773 (diff)
downloadgsoc2013-evolution-613e004309c27c94abd4b7159f430796ae70228a.tar.gz
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
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/camel-store.c2
-rw-r--r--camel/providers/local/camel-local-store.c11
3 files changed, 11 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 81c2eab6de..c13997d54e 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2001-10-30 <NotZed@Ximian.com>
+ * providers/local/camel-local-store.c (rename_folder): Dont try to
+ move ibex if we have none.
+
* camel-tcp-stream-openssl.c (stream_write): Fixed compilation
errors.
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 5fd2032239..2b77d048c6 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -418,7 +418,7 @@ camel_store_rename_folder (CamelStore *store, const char *old_name, const char *
struct _get_info info = { store, NULL, old_name, new_name };
int i;
- printf("store rename folder '%s' '%s'\n", old_name, new_name);
+ d(printf("store rename folder %s '%s' '%s'\n", ((CamelService *)store)->url->protocol, old_name, new_name));
if (strcmp(old_name, new_name) == 0)
return;
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: