+ if (triedcreate)
+ {
+ dprint (1, (debugfile, "Already tried to create mailbox %s\n", mbox));
+ break;
+ }
+ /* bail out if command failed for reasons other than nonexistent target */
+ if (ascii_strncasecmp (imap_get_qualifier (idata->buf), "[TRYCREATE]", 11))
+ break;
+ dprint (3, (debugfile, "imap_copy_messages: server suggests TRYCREATE\n"));
+ snprintf (prompt, sizeof (prompt), _("Create %s?"), mbox);
+ if (option (OPTCONFIRMCREATE) && mutt_yesorno (prompt, 1) < 1)
+ {
+ mutt_clear_error ();
+ break;
+ }
+ if (imap_create_mailbox (idata, mbox) < 0)
+ break;
+ triedcreate = 1;