From 613e004309c27c94abd4b7159f430796ae70228a Mon Sep 17 00:00:00 2001 From: 0 Date: Tue, 30 Oct 2001 05:20:50 +0000 Subject: Dont try to move ibex if we have none. 2001-10-30 * providers/local/camel-local-store.c (rename_folder): Dont try to move ibex if we have none. svn path=/trunk/; revision=14429 --- camel/providers/local/camel-local-store.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'camel/providers/local/camel-local-store.c') 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: -- cgit v1.2.3