]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_rename() shouldn't require source mailbox to exist.
authorTimo Sirainen <tss@iki.fi>
Wed, 20 Mar 2013 15:43:32 +0000 (17:43 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 20 Mar 2013 15:43:32 +0000 (17:43 +0200)
\Noselect mailboxes may not exist. The nonexistence will be noticed
eventually in the backend code.

src/lib-storage/mail-storage.c

index 576d8a7ef2373262d4ffda9300daa1cd614eae6a..1660112f5556d65459d06f271edc4497a69bbf19 100644 (file)
@@ -1359,7 +1359,8 @@ int mailbox_rename(struct mailbox *src, struct mailbox *dest)
 {
        const char *error = NULL;
 
-       if (mailbox_verify_existing_name(src) < 0)
+       /* Check only name validity, \Noselect don't necessarily exist. */
+       if (mailbox_verify_name(src) < 0)
                return -1;
        if (*src->name == '\0') {
                mail_storage_set_error(src->storage, MAIL_ERROR_PARAMS,