commit 1e659c275425d6296a1dddbb48aad67a85ecf9f1
Author: Oswald Buddenhagen <o...@kde.org>
Date:   Mon Nov 15 10:30:24 2010 +0100

    purge imap_store_t::currentnc vestiges
    
    we always actually open the mailbox before appending to it, so we
    obviously know that it exists - that's why the code was already
    commented out. changing this assumption would significantly complicate
    matters for little gain, so let's just assume it won't happen.
    
    consequently, also don't set param.create when appending to regular
    mailboxes.

 src/drv_imap.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 5b6e469..dbe4c31 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -115,8 +115,8 @@ struct imap_cmd;
 typedef struct imap_store {
        store_t gen;
        const char *prefix;
-       unsigned /*currentnc:1,*/ trashnc:1;
        int uidnext; /* from SELECT responses */
+       unsigned trashnc:1; /* trash folder's existence is not confirmed yet */
        unsigned got_namespace:1;
        list_t *ns_personal, *ns_other, *ns_shared; /* NAMESPACE info */
        message_t **msgapp; /* FETCH results */
@@ -1540,10 +1540,8 @@ imap_select( store_t *gctx, int minuid, int maxuid, int 
*excs, int nexcs,
 
 
        if (!strcmp( gctx->name, "INBOX" )) {
-//             ctx->currentnc = 0;
                prefix = "";
        } else {
-//             ctx->currentnc = 1;     /* could use LIST results for that */
                prefix = ctx->prefix;
        }
 
@@ -1698,9 +1696,6 @@ imap_store_msg( store_t *gctx, msg_data_t *data, int 
to_trash,
        } else {
                box = gctx->name;
                prefix = !strcmp( box, "INBOX" ) ? "" : ctx->prefix;
-               cmd->param.create = (gctx->opts & OPEN_CREATE) != 0;
-               /*if (ctx->currentnc)
-                       ctx->caps = ctx->rcaps & ~(1 << LITERALPLUS);*/
        }
        ret = imap_exec_m( ctx, cmd, "APPEND \"%s%s\" %s", prefix, box, flagstr 
);
        ctx->caps = ctx->rcaps;
@@ -1708,9 +1703,6 @@ imap_store_msg( store_t *gctx, msg_data_t *data, int 
to_trash,
                return cb( ret, -1, aux );
        if (to_trash)
                ctx->trashnc = 0;
-       else {
-               /*ctx->currentnc = 0;*/
-       }
 
        return cb( DRV_OK, uid, aux );
 }

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to