MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / renameFolder

Method renameFolder

src/core/imap/MCIMAPSession.cpp:1591–1615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1589}
1590
1591void IMAPSession::renameFolder(String * folder, String * otherName, ErrorCode * pError)
1592{
1593 int r;
1594
1595 selectIfNeeded(MCSTR("INBOX"), pError);
1596 if (* pError != ErrorNone)
1597 return;
1598
1599 r = mailimap_rename(mImap, MCUTF8(folder), MCUTF8(otherName));
1600 if (r == MAILIMAP_ERROR_STREAM) {
1601 mShouldDisconnect = true;
1602 * pError = ErrorConnection;
1603 return;
1604 }
1605 else if (r == MAILIMAP_ERROR_PARSE) {
1606 mShouldDisconnect = true;
1607 * pError = ErrorParse;
1608 return;
1609 }
1610 else if (hasError(r)) {
1611 * pError = ErrorRename;
1612 return;
1613 }
1614 * pError = ErrorNone;
1615}
1616
1617void IMAPSession::deleteFolder(String * folder, ErrorCode * pError)
1618{

Callers 1

mainMethod · 0.80

Calls 1

hasErrorFunction · 0.85

Tested by

no test coverage detected