[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Don Sanders <don () sanders ! org>
Date: 2005-04-29 4:07:13
Message-ID: 20050429040713.E68D7629 () office ! kde ! org
[Download RAW message or body]
CVS commit by sanders:
Sanity checking for applying filters on the saved list of unfiltered
messages.
This could be better, I really want to check that folder is equal
to the inbox folder for this imap account.
M +18 -1 kmacctimap.cpp 1.195
--- kdepim/kmail/kmacctimap.cpp #1.194:1.195
@@ -410,7 +411,23 @@ void KMAcctImap::postProcessNewMail( KMF
kmkernel->msgDict()->getLocation( *filterIt, &folder, &idx );
// It's possible that the message has been deleted or moved into a
- // different folder
+ // different folder, or that the serNum is stale
+
+ KMFolderImap *imapFolder = static_cast<KMFolderImap*>(folder->storage());
+ if (!imapFolder->folder()->isSystemFolder() ||
+ !(imapFolder->imapPath() == "/INBOX/") ) { // sanity checking
+ mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ ++filterIt;
+ continue;
+ }
+
if (folder && (idx != -1)) {
+
msg = folder->getMsg( idx );
+ if (!msg) { // sanity checking
+ mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ ++filterIt;
+ continue;
+ }
+
if (msg->transferInProgress()) {
inTransit.append( *filterIt );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic