Summary: | mail size shown wrong | ||
---|---|---|---|
Product: | [Unmaintained] KMail Mobile | Reporter: | Marcus Brinkmann <marcus.brinkmann> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | ludwig.reiter |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Windows CE | ||
OS: | Microsoft Windows CE | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Marcus Brinkmann
2010-12-20 14:31:07 UTC
commit 36e15632fa7ee1c26a7b1fcd777fb341d49fabd9 branch master Author: Tobias Koenig <tokoe@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 version 2011-01-12 It works now. |