Skip to content

Commit

Permalink
Fix renaming mailboxes that are at the root.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 17, 2014
1 parent 45ab7e1 commit 088fa8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imp/lib/Ajax/Application/Handler/Dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public function renameMailbox()
$parent = isset($this->vars->new_parent)
? IMP_Mailbox::formFrom($this->vars->new_parent)
: IMP_Mailbox::get($old_name->parent_imap);
$parent = $parent ? $parent : IMP_Mailbox::get(IMP_Ftree::BASE_ELT);

$new_name = $parent->createMailboxName($this->vars->new_name);

if (($old_name != $new_name) && $old_name->rename($new_name)) {
Expand Down

0 comments on commit 088fa8f

Please sign in to comment.