summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imap4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kioslaves/imap4/imap4.cc')
-rw-r--r--kioslaves/imap4/imap4.cc21
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;