if ($name instanceof Zend_Mail_Storage_Folder
) { $name =
$name->
getGlobalName();
} $name =
trim($name,
$this->_delim
);
if (strpos($name, 'INBOX' .
$this->_delim
) === 0
) { $name =
substr($name, 6
);
} // check if folder exists and has no children
if (!
$this->
getFolders($name)->
isLeaf()) { /**
* @see Zend_Mail_Storage_Exception
*/
throw new Zend_Mail_Storage_Exception('delete children first'
);
} if ($name == 'INBOX' ||
$name == DIRECTORY_SEPARATOR ||
$name == '/'
) { /**
* @see Zend_Mail_Storage_Exception
*/
throw new Zend_Mail_Storage_Exception('wont delete INBOX'
);
}