dovecot-1.1: If mbox isn't writable, don't try to update its ati...

dovecot at dovecot.org dovecot at dovecot.org
Thu Mar 20 15:02:35 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/264d4f41c627
changeset: 7427:264d4f41c627
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Mar 20 15:02:31 2008 +0200
description:
If mbox isn't writable, don't try to update its atime with utime().

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/lib-storage/index/mbox/mbox-sync.c |    3 ++-

diffs (13 lines):

diff -r 11e7ec83665d -r 264d4f41c627 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c	Wed Mar 19 20:03:24 2008 +0200
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Thu Mar 20 15:02:31 2008 +0200
@@ -1788,7 +1788,8 @@ again:
                 ret = mbox_rewrite_base_uid_last(&sync_ctx);
 	}
 
-	if (ret == 0 && mbox->mbox_fd != -1 && mbox->ibox.keep_recent) {
+	if (ret == 0 && mbox->mbox_fd != -1 && mbox->ibox.keep_recent &&
+	    !sync_ctx.mbox->mbox_readonly) {
 		/* try to set atime back to its original value */
 		struct utimbuf buf;
 		struct stat st;


More information about the dovecot-cvs mailing list