瀏覽代碼

Don't bother uploaded messages marked deleted when we are going to expunge.

Michael Elkins 23 年之前
父節點
當前提交
dd1b19a99a
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      sync.c

+ 13 - 0
sync.c

@@ -110,6 +110,15 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
 	    {
 		struct stat sb;
 
+		if ((cur->flags & D_DELETED) && (flags & SYNC_EXPUNGE))
+		{
+		  /*
+		   * This message is marked as deleted and we are
+		   * expunging.  Don't upload to the server.
+		   */
+		  continue;
+		}
+
 		if ((flags & SYNC_QUIET) == 0)
 		{
 		    if (!upload)
@@ -152,6 +161,10 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
 
 		close (fd);
 	    }
+	    /*
+	     * message used to exist on server but no longer does (we know
+	     * this beacause it has a UID associated with it).
+	     */
 	    else if (flags & SYNC_DELETE)
 	    {
 		cur->flags |= D_DELETED;