diff -r d141fc1ad77b -r e61a04404bdf mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Tue Jul 06 14:48:59 2010 +0300 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Wed Aug 18 10:16:02 2010 +0300 @@ -292,15 +292,15 @@ // Move the file first no matter if it will fail in Get/SetPreviousPropertiesL // Already trapped inside GetPreviousPropertiesL( *iObjectInfo ); - TRAPD( err, SetPropertiesL( aNewFileName ) ); + TRAP_IGNORE( SetPropertiesL( aNewFileName ) ); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); - err = fileMan->Move( *oldFileName, aNewFileName ); - - CleanupStack::PopAndDestroy( oldFileName ); // - oldFileName - - if ( err != KErrNone ) - PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL err = %d" ), err ); + CleanupStack::PushL( fileMan ); // + fileMan + TInt err = fileMan->Move( *oldFileName, aNewFileName ); + PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL err = %d" ), err ); + User::LeaveIfError( err ); + CleanupStack::PopAndDestroy( fileMan ); // - fileMan + CleanupStack::PopAndDestroy( oldFileName ); // - oldFileName PRINT( _L( "MM MTP <= CMoveObject::MoveFileL" ) ); } @@ -314,8 +314,6 @@ { PRINT( _L( "MM MTP => CMoveObject::GetPreviousPropertiesL" ) ); - const TDesC& suid( aObject.DesC( CMTPObjectMetaData::ESuid ) ); - // same storage, not necessary to get the properties if ( iSameStorage ) return; @@ -408,8 +406,6 @@ { PRINT( _L( "MM MTP => CMoveObject::SetPreviousPropertiesL" ) ); - TMTPResponseCode respcode = EMTPRespCodeOK; - iPropertyList->ResetCursor(); const TInt count = iPropertyList->NumberOfElements(); for ( TInt i = 0; i < count; i++ ) @@ -449,7 +445,7 @@ { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData - respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, + iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, *iObjectInfo ); @@ -460,7 +456,7 @@ default: { - respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, + iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, propertyCode, *iObjectInfo, element ); @@ -469,13 +465,7 @@ } } // end of for loop - // ignore errors - if ( respcode == EMTPRespCodeOK ) - { - // do nothing, just to get rid of build warning - } - - PRINT1( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode ); + PRINT( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL" ) ); } // -----------------------------------------------------------------------------