From f3e0d87b42f7b957b5e37a7995ea4550770c3928 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 15 Jun 2000 17:52:06 +0000 Subject: Fix to previous change: make sure the "seek" variable ends up with the * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to previous change: make sure the "seek" variable ends up with the value it should. * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update summary mtime as well as size. svn path=/trunk/; revision=3577 --- camel/providers/mbox/camel-mbox-summary.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'camel/providers/mbox/camel-mbox-summary.c') diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c index c2fd326104..03f2f2f250 100644 --- a/camel/providers/mbox/camel-mbox-summary.c +++ b/camel/providers/mbox/camel-mbox-summary.c @@ -273,6 +273,7 @@ static int message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageIn static int summary_rebuild(CamelMboxSummary *mbs, off_t offset) { + CamelFolderSummary *s = (CamelFolderSummary *)mbs; CamelMimeParser *mp; int fd; int ok = 0; @@ -317,11 +318,16 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset) g_assert(camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM_END); } - /* update the file size in the summary */ - if (ok != -1) - mbs->folder_size = camel_mime_parser_seek(mp, 0, SEEK_CUR); - printf("updating folder size = %d\n", mbs->folder_size); gtk_object_unref((GtkObject *)mp); + /* update the file size/mtime in the summary */ + if (ok != -1) { + struct stat st; + + if (stat (mbs->folder_path, &st) == 0) { + mbs->folder_size = st.st_size; + s->time = st.st_mtime; + } + } return ok; } -- cgit