]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mailbox_copy() now sets mail_save_context.copying=TRUE.
authorTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 21:01:26 +0000 (17:01 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 21:01:26 +0000 (17:01 -0400)
--HG--
branch : HEAD

src/lib-storage/mail-copy.c
src/lib-storage/mail-storage-private.h

index 057cb8e7143e8966af32275909cefac6733229a4..9d94c32e23d0f011f7a4d5c7222cd6af9d0d8f5a 100644 (file)
@@ -12,6 +12,8 @@ int mail_storage_copy(struct mail_save_context *ctx, struct mail *mail)
        const char *from_envelope, *guid;
        time_t received_date;
 
+       ctx->copying = TRUE;
+
        /* we need to open the file in any case. caching metadata is unlikely
           to help anything. */
        pmail->v.set_uid_cache_updates(mail, TRUE);
index b49e3cfb2f74bfe7eaf4527ef4e5fd3a43b00167..95fea8b6a22b0920d1e25869729d8ce1da25041d 100644 (file)
@@ -396,6 +396,9 @@ struct mail_save_context {
        uint32_t uid;
        char *guid, *pop3_uidl, *from_envelope;
        struct ostream *output;
+
+       /* we came here from mailbox_copy() */
+       unsigned int copying:1;
 };
 
 struct mailbox_sync_context {