diff -r 72d484772ca6 -r a3a1ae9acec6 emailuis/emailui/src/FreestyleEmailUiAttachmentsListModel.cpp --- a/emailuis/emailui/src/FreestyleEmailUiAttachmentsListModel.cpp Fri Mar 12 15:41:14 2010 +0200 +++ b/emailuis/emailui/src/FreestyleEmailUiAttachmentsListModel.cpp Mon Mar 15 12:39:10 2010 +0200 @@ -465,6 +465,18 @@ return msgFound; } +TBool CFSEmailUiAttachmentsListModel::IsThereAnyNonMessageAttachments() const + { + FUNC_LOG; + TBool msgFound = EFalse; + TInt attCount = iAttachments.Count(); + for ( TInt i = 0 ; i < attCount && !msgFound ; i++ ) + { + msgFound = !IsMessage( iAttachments[i] ); + } + return msgFound; + } + void CFSEmailUiAttachmentsListModel::UpdateListL( CFSMailMessage* aEmbeddedMessage ) { FUNC_LOG; @@ -593,10 +605,15 @@ TBool retVal = EFalse; TInt attCount = iAttachments.Count(); TInt savedCount( 0 ); + const CFSMailBox* mailbox( iAppUi.GetActiveMailbox() ); for ( TInt i = 0; i < attCount; i++ ) { - TBool downloadStarted = SaveAttachmentL( iAttachments[i], aFileName, savedCount ); - retVal = downloadStarted || retVal; + if ( !IsMessage( iAttachments[i] ) || + ( mailbox && mailbox->HasCapability( EFSMboxCapaSupportsSavingOfEmbeddedMessages ) ) ) + { + TBool downloadStarted = SaveAttachmentL( iAttachments[i], aFileName, savedCount ); + retVal = downloadStarted || retVal; + } } if ( savedCount ) {