1 |
dilfridge 11/09/27 23:35:51 |
2 |
|
3 |
Added: kdepim-runtime-4.7.1-emptyids.patch |
4 |
Log: |
5 |
Backport fix for potential mail loss bug, from packagers ml |
6 |
|
7 |
(Portage version: 2.1.10.19/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 kde-base/kdepim-runtime/files/kdepim-runtime-4.7.1-emptyids.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/kdepim-runtime-4.7.1-emptyids.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/kdepim-runtime-4.7.1-emptyids.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: kdepim-runtime-4.7.1-emptyids.patch |
16 |
=================================================================== |
17 |
From ccd67f3e65c9ffe32858ca521aa1e56a42b026af Mon Sep 17 00:00:00 2001 |
18 |
From: Volker Krause <vkrause@×××.org> |
19 |
Date: Tue, 20 Sep 2011 10:12:40 +0200 |
20 |
Subject: [PATCH] Ignore items with empty remote ids here. |
21 |
|
22 |
Items with empty remote id are those not yet stored by the resource, |
23 |
ie. we still have pending change replays for those. So, if we do a sync |
24 |
during that period (which could happen since the introduction of the |
25 |
file system watcher), we would remove a random one of those (only one |
26 |
since the map would only contain one without a remote id). This mostly |
27 |
affects the POP3 usage pattern. |
28 |
(cherry picked from commit f814b46a799ea8418ae17cf77d44da473124d12d) |
29 |
--- |
30 |
resources/maildir/retrieveitemsjob.cpp | 6 ++++-- |
31 |
1 files changed, 4 insertions(+), 2 deletions(-) |
32 |
|
33 |
diff --git a/resources/maildir/retrieveitemsjob.cpp b/resources/maildir/retrieveitemsjob.cpp |
34 |
index 7253f7e..f0273ef 100644 |
35 |
--- a/resources/maildir/retrieveitemsjob.cpp |
36 |
+++ b/resources/maildir/retrieveitemsjob.cpp |
37 |
@@ -57,8 +57,10 @@ void RetrieveItemsJob::localListDone ( KJob* job ) |
38 |
|
39 |
const Akonadi::Item::List items = qobject_cast<Akonadi::ItemFetchJob*>( job )->items(); |
40 |
m_localItems.reserve( items.size() ); |
41 |
- foreach ( const Akonadi::Item &item, items ) |
42 |
- m_localItems.insert( item.remoteId(), item ); |
43 |
+ foreach ( const Akonadi::Item &item, items ) { |
44 |
+ if ( !item.remoteId().isEmpty() ) |
45 |
+ m_localItems.insert( item.remoteId(), item ); |
46 |
+ } |
47 |
|
48 |
const QStringList entryList = m_maildir.entryList(); |
49 |
qint64 previousMtime = m_collection.remoteRevision().toLongLong(); |
50 |
-- |
51 |
1.7.1 |