]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
IMAP RENAME: If dest mailbox exists but source doesn't, fail with "Mailbox doesn...
authorTimo Sirainen <tss@iki.fi>
Tue, 16 Jun 2009 01:22:30 +0000 (21:22 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 16 Jun 2009 01:22:30 +0000 (21:22 -0400)
--HG--
branch : HEAD

src/imap/cmd-rename.c

index 387bc4fb88f7276f6c63067c25ead9509c7f058e..77f1154f2225bc9601b5403721050af7cecf10c2 100644 (file)
@@ -14,6 +14,8 @@ bool cmd_rename(struct client_command_context *cmd)
        if (!client_read_string_args(cmd, 2, &oldname, &newname))
                return FALSE;
 
+       if (!client_verify_mailbox_name(cmd, oldname, TRUE, FALSE))
+               return TRUE;
        if (!client_verify_mailbox_name(cmd, newname, FALSE, TRUE))
                return TRUE;