diff -r 91d5ad76f5c6 -r 16db3449d7ba mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Wed Sep 15 12:45:22 2010 +0300 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Wed Oct 13 15:06:09 2010 +0300 @@ -292,15 +292,15 @@ // Move the file first no matter if it will fail in Get/SetPreviousPropertiesL // Already trapped inside GetPreviousPropertiesL( *iObjectInfo ); - TRAP_IGNORE( SetPropertiesL( aNewFileName ) ); + TRAPD( err, SetPropertiesL( aNewFileName ) ); CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); - 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 + err = fileMan->Move( *oldFileName, aNewFileName ); + + CleanupStack::PopAndDestroy( oldFileName ); // - oldFileName + + if ( err != KErrNone ) + PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL err = %d" ), err ); PRINT( _L( "MM MTP <= CMoveObject::MoveFileL" ) ); } @@ -408,6 +408,8 @@ { PRINT( _L( "MM MTP => CMoveObject::SetPreviousPropertiesL" ) ); + TMTPResponseCode respcode = EMTPRespCodeOK; + iPropertyList->ResetCursor(); const TInt count = iPropertyList->NumberOfElements(); for ( TInt i = 0; i < count; i++ ) @@ -447,7 +449,7 @@ { CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData - iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, + respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, propertyCode, *stringData, *iObjectInfo ); @@ -458,7 +460,7 @@ default: { - iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, + respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, propertyCode, *iObjectInfo, element ); @@ -467,7 +469,13 @@ } } // end of for loop - PRINT( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL" ) ); + // ignore errors + if ( respcode == EMTPRespCodeOK ) + { + // do nothing, just to get rid of build warning + } + + PRINT1( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode ); } // -----------------------------------------------------------------------------