diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /kioslaves/imap4/imap4.cc | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip |
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed
* Added journal read support to the CalDAV resource
* Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves/imap4/imap4.cc')
-rw-r--r-- | kioslaves/imap4/imap4.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc index 1cfd56027..2290c6787 100644 --- a/kioslaves/imap4/imap4.cc +++ b/kioslaves/imap4/imap4.cc @@ -1780,14 +1780,15 @@ IMAP4Protocol::rename (const KURL & src, const KURL & dest, bool overwrite) completeQueue.removeRef(cmd); if (!ok) { - error(ERR_CANNOT_RENAME, i18n("Unable to close mailbox.")); + kdWarning(7116) << "Unable to close mailbox!" << endl; + error(ERR_CANNOT_RENAME, src.path()); return; } setState(ISTATE_LOGIN); } imapCommand *cmd = doCommand (imapCommand::clientRename (sBox, dBox)); if (cmd->result () != "OK") { - error (ERR_CANNOT_RENAME, cmd->result ()); + error (ERR_CANNOT_RENAME, src.path()); completeQueue.removeRef (cmd); return; } @@ -1798,13 +1799,13 @@ IMAP4Protocol::rename (const KURL & src, const KURL & dest, bool overwrite) case ITYPE_MSG: case ITYPE_ATTACH: case ITYPE_UNKNOWN: - error (ERR_CANNOT_RENAME, src.prettyURL()); + error (ERR_CANNOT_RENAME, src.path()); break; } } else { - error (ERR_CANNOT_RENAME, src.prettyURL()); + error (ERR_CANNOT_RENAME, src.path()); return; } finished (); @@ -2111,6 +2112,18 @@ bool IMAP4Protocol::makeLogin () removeCapability( "ANNOTATEMORE" ); } + // starting from Cyrus IMAP 2.3.9, shared seen flags are available + TQRegExp regExp( "Cyrus\\sIMAP[4]{0,1}\\sv(\\d+)\\.(\\d+)\\.(\\d+)", false ); + if ( regExp.search( greeting ) >= 0 ) { + const int major = regExp.cap( 1 ).toInt(); + const int minor = regExp.cap( 2 ).toInt(); + const int patch = regExp.cap( 3 ).toInt(); + if ( major > 2 || (major == 2 && (minor > 3 || (minor == 3 && patch > 9))) ) { + kdDebug(7116) << k_funcinfo << "Cyrus IMAP >= 2.3.9 detected, enabling shared seen flag support" << endl; + imapCapabilities.append( "x-kmail-sharedseen" ); + } + } + kdDebug(7116) << "IMAP4::makeLogin - attempting login" << endl; KIO::AuthInfo authInfo; |