[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-save.c,1.8,1.9 maildir-storage.h,1.6,1.7
cras at procontrol.fi
cras at procontrol.fi
Thu Oct 24 04:15:41 EEST 2002
Update of /home/cvs/dovecot/src/lib-storage/index/maildir
In directory danu:/tmp/cvs-serv28234/lib-storage/index/maildir
Modified Files:
maildir-save.c maildir-storage.h
Log Message:
Fixes to timezone handling which were handling quite badly. added
ioloop_timezone which gets updated with ioloop_time. Changed some GMT
references to UTC. Timezone offsets are in minutes now everywhere instead of
seconds. Fixes for unsigned time_t.
Index: maildir-save.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-save.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- maildir-save.c 21 Oct 2002 00:24:54 -0000 1.8
+++ maildir-save.c 24 Oct 2002 00:15:39 -0000 1.9
@@ -78,6 +78,7 @@
int maildir_storage_save(Mailbox *box, MailFlags flags,
const char *custom_flags[], time_t internal_date,
+ int timezone_offset __attr_unused__,
IBuffer *data, uoff_t data_size)
{
IndexMailbox *ibox = (IndexMailbox *) box;
@@ -110,7 +111,11 @@
/* set the internal_date by modifying mtime */
buf.actime = ioloop_time;
buf.modtime = internal_date;
- (void)utime(tmp_path, &buf);
+ if (utime(tmp_path, &buf) < 0) {
+ /* just warn, don't bother actually failing */
+ mail_storage_set_critical(box->storage, "utime() failed for "
+ "%s: %m", tmp_path);
+ }
/* move the file into new/ directory - syncing will pick it
up from there */
Index: maildir-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- maildir-storage.h 21 Oct 2002 00:24:54 -0000 1.6
+++ maildir-storage.h 24 Oct 2002 00:15:39 -0000 1.7
@@ -6,7 +6,8 @@
int maildir_storage_copy(Mailbox *box, Mailbox *destbox,
const char *messageset, int uidset);
int maildir_storage_save(Mailbox *box, MailFlags flags,
- const char *custom_flags[], time_t internal_date,
+ const char *custom_flags[],
+ time_t internal_date, int timezone_offset,
IBuffer *data, uoff_t data_size);
int maildir_find_mailboxes(MailStorage *storage, const char *mask,
More information about the dovecot-cvs
mailing list