From a65c7bb4769b16dda87c1bdf2cb06784b4090d4a Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 24 Sep 2002 01:16:12 +0000 Subject: If we have no data written to a key, dont add it, or its partition header. 2002-09-24 Not Zed * camel-text-index.c (text_index_compress_nosync): If we have no data written to a key, dont add it, or its partition header. 2002-09-23 Not Zed * camel-block-file.c (sync_nolock): Mark root block dirty if we're going to sync it. (camel_key_file_finalise): de-count the active list if we close it. * camel-text-index.c (text_index_delete): Implement. (text_index_compress_nosync): Use index_delete when we're finished with the old one, so it is properly deactivated. * camel-index.c (camel_index_delete): Remove api call. Mark index deleted in new state variable. (camel_index_*): Wrap all calls in check for deleted state. svn path=/trunk/; revision=18189 --- camel/camel-block-file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'camel/camel-block-file.c') diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c index e61320b2ea..3ba97ba556 100644 --- a/camel/camel-block-file.c +++ b/camel/camel-block-file.c @@ -713,6 +713,7 @@ sync_nolock(CamelBlockFile *bs) d(printf("turning on sync flag\n")); bs->root->flags |= CAMEL_BLOCK_FILE_SYNC; + bs->root_block->flags |= CAMEL_BLOCK_DIRTY; return sync_block_nolock(bs, bs->root_block); } @@ -834,8 +835,10 @@ camel_key_file_finalise(CamelKeyFile *bs) e_dlist_remove((EDListNode *)p); UNLOCK(key_file_lock); - if (bs->fp) + if (bs-> fp) { + key_file_count--; fclose(bs->fp); + } g_free(bs->path); #ifdef ENABLE_THREADS -- cgit v1.2.3