From cb13084bc24c04b16af88744f6eb67ae7f779018 Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Thu, 11 May 2000 20:46:13 +0000 Subject: > * providers/mbox/camel-mbox-folder.c (message_changed): Indicate > the summary changed also. > > (camel_mbox_summary_update): Also save summary when done. > (camel_mbox_summary_expunge): Unindex items when deleting them. > (camel_mbox_summary_expunge): Save the index as well as the > summary. > (camel_folder_summary_touch): New function, indicate the summary > info changed. > (camel_folder_summary_remove): Dirty here. svn path=/trunk/; revision=2994 --- camel/camel-folder-summary.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 854017daa9..6f80a62325 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -367,13 +367,15 @@ camel_folder_summary_save(CamelFolderSummary *s) g_assert(s->summary_path); - printf("saving summary?\n"); + printf("saving summary? '%s'\n", s->summary_path); if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0) { printf("nup\n"); return 0; } + printf("yep\n"); + fd = open(s->summary_path, O_RDWR|O_CREAT, 0600); if (fd == -1) return -1; @@ -492,6 +494,12 @@ perform_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci) } } +void +camel_folder_summary_touch(CamelFolderSummary *s) +{ + s->flags |= CAMEL_SUMMARY_DIRTY; +} + void camel_folder_summary_clear(CamelFolderSummary *s) { @@ -526,6 +534,7 @@ void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info) if (s->build_content && ci) { perform_content_info_free(s, ci); } + s->flags |= CAMEL_SUMMARY_DIRTY; } void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid) -- cgit v1.2.3