12 May 2009 13:02
[PATCH] Reset atime when leaving mbox/mmdf with new mail
Rocco Rutte <pdmef <at> gmx.net>
2009-05-12 11:02:12 GMT
2009-05-12 11:02:12 GMT
Hi,
the attached patch is supposed to set atime=mtime-1 for mbox and mmdf
folders if they contain new mail upon sync as we do for other folder
types. This only works if $check_mbox_size is unset.
See also ticket #1362.
I think the patch is okay. But I don't know why the old code does
restore atime+mtime for the folder (and so I removed the update).
Anyone?
Rocco
diff --git a/mbox.c b/mbox.c
--- a/mbox.c
+++ b/mbox.c
<at> <at> -679,6 +679,26 <at> <at> int mbox_check_mailbox (CONTEXT *ctx, in
return (-1);
}
+/* if mailbox has at least 1 new message, sets mtime > atime of mailbox
+ * so buffy check reports new mail */
+static void reset_atime (CONTEXT *ctx)
+{
+ struct utimbuf utimebuf;
+ int i;
+ time_t now;
+
(Continue reading)
RSS Feed