dovecot: Don't change ctime/mtime when stating if they're alread...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 8 21:37:47 EET 2007
details: http://hg.dovecot.org/dovecot/rev/75f7163d4379
changeset: 6752:75f7163d4379
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 08 21:37:43 2007 +0200
description:
Don't change ctime/mtime when stating if they're already set.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-storage/index/raw/raw-mail.c | 6 ++++--
diffs (16 lines):
diff -r a6782f59c44f -r 75f7163d4379 src/lib-storage/index/raw/raw-mail.c
--- a/src/lib-storage/index/raw/raw-mail.c Thu Nov 08 21:27:44 2007 +0200
+++ b/src/lib-storage/index/raw/raw-mail.c Thu Nov 08 21:37:43 2007 +0200
@@ -21,8 +21,10 @@ static int raw_mail_stat(struct mail *ma
return -1;
}
- mbox->mtime = st->st_mtime;
- mbox->ctime = st->st_ctime;
+ if (mbox->mtime != (time_t)-1)
+ mbox->mtime = st->st_mtime;
+ if (mbox->ctime != (time_t)-1)
+ mbox->ctime = st->st_ctime;
mbox->size = st->st_size;
return 0;
}
More information about the dovecot-cvs
mailing list