aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-block-file.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-09-24 09:16:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-09-24 09:16:12 +0800
commita65c7bb4769b16dda87c1bdf2cb06784b4090d4a (patch)
tree8e77d9424cf98f558b57a1174c621bb014740ec8 /camel/camel-block-file.c
parent5ca425852cab78a782c1b354555f7c9c380d8e02 (diff)
downloadgsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.gz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.bz2
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.lz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.xz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.zst
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.zip
If we have no data written to a key, dont add it, or its partition header.
2002-09-24 Not Zed <NotZed@Ximian.com> * 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 <NotZed@Ximian.com> * 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
Diffstat (limited to 'camel/camel-block-file.c')
-rw-r--r--camel/camel-block-file.c5
1 files changed, 4 insertions, 1 deletions
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