[Bug 260791] mail size shown wrong
Tobias Koenig
tokoe at kde.org
Tue Dec 21 10:21:32 GMT 2010
https://bugs.kde.org/show_bug.cgi?id=260791
Tobias Koenig <tokoe at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Tobias Koenig <tokoe kde org> 2010-12-21 11:21:32 ---
commit 36e15632fa7ee1c26a7b1fcd777fb341d49fabd9
branch master
Author: Tobias Koenig <tokoe at kde.org>
Date: Tue Dec 21 11:22:49 2010 +0100
Include only payload parts in partSizes calculation
This will fix the bug that item size is changed
if an ItemModifyJob is executed with setIgnorePayload( true )
and an attribute to change.
BUG: 260791
diff --git a/server/src/handler/store.cpp b/server/src/handler/store.cpp
index 7b10a0b..2021850 100644
--- a/server/src/handler/store.cpp
+++ b/server/src/handler/store.cpp
@@ -265,7 +265,8 @@ bool Store::parseStream()
QByteArray value;
if ( m_streamParser->hasLiteral() ) {
const qint64 dataSize = m_streamParser->remainingLiteralSize();
- partSizes += dataSize;
+ if ( partName.startsWith( "PLD:" ) )
+ partSizes += dataSize;
const bool storeInFile = (
DbConfig::configuredDatabase()->useExternalPayloadFile() && dataSize >
DbConfig::configuredDatabase()->sizeThreshold() );
//actual case when streaming storage is used: external payload is
enabled, data is big enough in a literal
if ( storeInFile ) {
@@ -310,7 +311,8 @@ bool Store::parseStream()
}
} else { //not a literal
value = m_streamParser->readString();
- partSizes += value.size();
+ if ( partName.startsWith( "PLD:" ) )
+ partSizes += value.size();
}
// only relevant for non-literals or non-external literals
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list