]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox_mail_get_save_date(): Last change was broken.
authorTimo Sirainen <tss@iki.fi>
Mon, 22 Mar 2010 13:27:07 +0000 (15:27 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 22 Mar 2010 13:27:07 +0000 (15:27 +0200)
--HG--
branch : HEAD

src/lib-storage/index/dbox-common/dbox-mail.c

index 4f249df5352fd986fefd3faeb3eb5a4b32973512..3eb04b33928dd85a849da3c10bf3a5b6fa661360 100644 (file)
@@ -136,14 +136,20 @@ int dbox_mail_get_received_date(struct mail *_mail, time_t *date_r)
 
 int dbox_mail_get_save_date(struct mail *_mail, time_t *date_r)
 {
+       struct dbox_storage *storage =
+               (struct dbox_storage *)_mail->box->storage;
        struct dbox_mail *mail = (struct dbox_mail *)_mail;
        struct index_mail_data *data = &mail->imail.data;
        struct dbox_file *file;
        struct stat st;
+       uoff_t offset;
 
        if (index_mail_get_save_date(_mail, date_r) == 0)
                return 0;
 
+       if (storage->v.mail_open(mail, &offset, &file) < 0)
+               return -1;
+
        mail->imail.mail.stats_fstat_lookup_count++;
        if (dbox_file_stat(file, &st) < 0) {
                if (errno == ENOENT)