aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-text-index.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-19 11:15:54 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-04-19 11:15:54 +0800
commit04ccbdd8e80cac98e26ecdf781101fedf748ac15 (patch)
tree706bd55d11891e3bb39e360a31a27233bb71f831 /camel/camel-text-index.c
parentd68227cb50fd2dba42dbba0c843220f5dfc434f2 (diff)
downloadgsoc2013-evolution-04ccbdd8e80cac98e26ecdf781101fedf748ac15.tar.gz
gsoc2013-evolution-04ccbdd8e80cac98e26ecdf781101fedf748ac15.tar.zst
gsoc2013-evolution-04ccbdd8e80cac98e26ecdf781101fedf748ac15.zip
** for #40989
2003-04-17 Not Zed <NotZed@Ximian.com> ** for #40989 * camel-text-index.c (text_index_delete): delete the block file/key file directly, not just its files. * providers/local/camel-local-folder.c (local_delete): implement, just delete the index file if it exists. camel-store-delete-folder will delete other data (maybe it all should be done here). * camel-block-file.c (camel_key_file_finalise): keep lock around decrementing key file use count. (camel_key_file_delete): new function to delete the key file (& close it off). (key_file_use): if we've been deleted, always fail. (camel_block_file_finalise): only close the file if its a valid fd. (block_file_use): if we've been deleted, always fail. (camel_block_file_delete): delete the block file & close. (struct _CamelBlockFilePrivate): fix the !ENABLE_THREADS case to still compile this. svn path=/trunk/; revision=20894
Diffstat (limited to 'camel/camel-text-index.c')
-rw-r--r--camel/camel-text-index.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index 710723168b..dfc85a1f55 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -531,7 +531,15 @@ fail:
static int
text_index_delete(CamelIndex *idx)
{
- return camel_text_index_remove(idx->path);
+ struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
+ int ret = 0;
+
+ if (camel_block_file_delete(p->blocks) == -1)
+ ret = -1;
+ if (camel_key_file_delete(p->links) == -1)
+ ret = -1;
+
+ return ret;
}
static int
dim2011-11-303-7/+31 * Mark as broken with clang: compiler not recognized.linimon2011-11-291-1/+7 * - remove MD5ohauer2011-07-031-1/+0 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+1 * Update to 2.4edwin2008-04-304-21/+20 * - Add SHA256pav2005-11-251-0/+1