diff options
author | Not Zed <NotZed@Ximian.com> | 2003-04-19 11:15:54 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-04-19 11:15:54 +0800 |
commit | 04ccbdd8e80cac98e26ecdf781101fedf748ac15 (patch) | |
tree | 706bd55d11891e3bb39e360a31a27233bb71f831 /camel/camel-text-index.c | |
parent | d68227cb50fd2dba42dbba0c843220f5dfc434f2 (diff) | |
download | gsoc2013-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.c | 10 |
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 |