]> git.pld-linux.org Git - packages/kde4-kdepim-runtime.git/blame - kde4-kdepim-runtime-branch.diff
- critical fix for loosing mails
[packages/kde4-kdepim-runtime.git] / kde4-kdepim-runtime-branch.diff
CommitLineData
44402c54
AM
1From ccd67f3e65c9ffe32858ca521aa1e56a42b026af Mon Sep 17 00:00:00 2001
2From: Volker Krause <vkrause@kde.org>
3Date: Tue, 20 Sep 2011 10:12:40 +0200
4Subject: [PATCH] Ignore items with empty remote ids here.
5
6Items with empty remote id are those not yet stored by the resource,
7ie. we still have pending change replays for those. So, if we do a sync
8during that period (which could happen since the introduction of the
9file system watcher), we would remove a random one of those (only one
10since the map would only contain one without a remote id). This mostly
11affects the POP3 usage pattern.
12(cherry picked from commit f814b46a799ea8418ae17cf77d44da473124d12d)
13---
14 resources/maildir/retrieveitemsjob.cpp | 6 ++++--
15 1 files changed, 4 insertions(+), 2 deletions(-)
16
17diff --git a/resources/maildir/retrieveitemsjob.cpp b/resources/maildir/retrieveitemsjob.cpp
18index 7253f7e..f0273ef 100644
19--- a/resources/maildir/retrieveitemsjob.cpp
20+++ b/resources/maildir/retrieveitemsjob.cpp
21@@ -57,8 +57,10 @@ void RetrieveItemsJob::localListDone ( KJob* job )
22
23 const Akonadi::Item::List items = qobject_cast<Akonadi::ItemFetchJob*>( job )->items();
24 m_localItems.reserve( items.size() );
25- foreach ( const Akonadi::Item &item, items )
26- m_localItems.insert( item.remoteId(), item );
27+ foreach ( const Akonadi::Item &item, items ) {
28+ if ( !item.remoteId().isEmpty() )
29+ m_localItems.insert( item.remoteId(), item );
30+ }
31
32 const QStringList entryList = m_maildir.entryList();
33 qint64 previousMtime = m_collection.remoteRevision().toLongLong();
34--
351.7.1
36
This page took 0.03423 seconds and 4 git commands to generate.