From 04ccbdd8e80cac98e26ecdf781101fedf748ac15 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Sat, 19 Apr 2003 03:15:54 +0000 Subject: ** for #40989 2003-04-17 Not Zed ** 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 --- camel/providers/local/camel-local-folder.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'camel/providers') diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c index c93f8b18c7..ca49071d2e 100644 --- a/camel/providers/local/camel-local-folder.c +++ b/camel/providers/local/camel-local-folder.c @@ -79,6 +79,7 @@ static GPtrArray *local_search_by_expression(CamelFolder *folder, const char *ex static GPtrArray *local_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex); static void local_search_free(CamelFolder *folder, GPtrArray * result); +static void local_delete(CamelFolder *folder); static void local_rename(CamelFolder *folder, const char *newname); static void local_finalize(CamelObject * object); @@ -104,6 +105,7 @@ camel_local_folder_class_init(CamelLocalFolderClass * camel_local_folder_class) camel_folder_class->search_by_uids = local_search_by_uids; camel_folder_class->search_free = local_search_free; + camel_folder_class->delete = local_delete; camel_folder_class->rename = local_rename; camel_local_folder_class->lock = local_lock; @@ -436,6 +438,16 @@ local_expunge(CamelFolder *folder, CamelException *ex) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->sync(folder, TRUE, ex); } +static void +local_delete(CamelFolder *folder) +{ + CamelLocalFolder *lf = (CamelLocalFolder *)folder; + + camel_index_delete(lf->index); + + parent_class->delete(folder); +} + static void local_rename(CamelFolder *folder, const char *newname) { -- cgit v1.2.3