Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5888:a4cd1f37d022 HEAD
Update tmp/ directory's atime+mtime with utime(NULL) so it works even if
we're not the directory owner.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 03 Jul 2007 20:44:08 +0300 |
parents | 3f2eb1b9c555 |
children | 8117a34abdbd |
files | src/lib-storage/index/maildir/maildir-util.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-util.c Tue Jul 03 20:04:28 2007 +0300 +++ b/src/lib-storage/index/maildir/maildir-util.c Tue Jul 03 20:44:08 2007 +0300 @@ -224,12 +224,7 @@ #endif else if (st.st_atime < ioloop_time) { /* mounted with noatime. update it ourself. */ - struct utimbuf ut; - - ut.actime = ioloop_time; - ut.modtime = st.st_mtime; - - if (utime(dir, &ut) < 0 && errno != ENOENT) { + if (utime(dir, NULL) < 0 && errno != ENOENT) { mail_storage_set_critical(storage, "utime(%s) failed: %m", dir); }