]> granicus.if.org Git - neomutt/commitdiff
this patch doesn't raise an error if you try to sync an empty mailbox
authorThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Thu, 27 Jan 2005 20:17:46 +0000 (20:17 +0000)
committerThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Thu, 27 Jan 2005 20:17:46 +0000 (20:17 +0000)
which makes it possible to use such a macro as this on an empty
mailbox:

macro index y "<sync-mailbox><change-folder>?"
macro pager y "<sync-mailbox><change-folder>?"

curs_main.c

index 9695a2eacb663b24f73ce6678c613fb54ee55d1a..3e24b553ddbe05eee0b95cac03eec25a051151e2 100644 (file)
@@ -984,6 +984,9 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
       
       case OP_MAIN_SYNC_FOLDER:
 
+       if (Context && !Context->msgcount)
+         break;
+
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
        CHECK_READONLY;