mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp
changeset 27 cbb1bfb7ebfb
parent 25 d881023c13eb
child 32 edd273b3192a
equal deleted inserted replaced
25:d881023c13eb 27:cbb1bfb7ebfb
   143             iRightPartName = iOldFileName.Right( iOldFileName.Length() - iOldFolderFullName.Length() );
   143             iRightPartName = iOldFileName.Right( iOldFileName.Length() - iOldFolderFullName.Length() );
   144             PRINT1( _L( "MM MTP <> CRenameObject::RunL right part name(%S)" ), &iRightPartName );
   144             PRINT1( _L( "MM MTP <> CRenameObject::RunL right part name(%S)" ), &iRightPartName );
   145 
   145 
   146             if ( iNewFolderName.Length() + iRightPartName.Length() <= KMaxFileName )
   146             if ( iNewFolderName.Length() + iRightPartName.Length() <= KMaxFileName )
   147                 {
   147                 {
   148                 PerformAdditionalActionL();
       
   149 
       
   150                 iFileName.Zero();
   148                 iFileName.Zero();
   151                 iFileName.Append( iNewFolderName );
   149                 iFileName.Append( iNewFolderName );
   152                 iFileName.Append( iRightPartName );
   150                 iFileName.Append( iRightPartName );
   153                 PRINT1( _L( "MM MTP <> CRenameObject::RunL new file name(%S)" ), &iFileName );
   151                 PRINT1( _L( "MM MTP <> CRenameObject::RunL new file name(%S)" ), &iFileName );
       
   152 
       
   153                 PerformAdditionalActionL();
       
   154 
   154                 // update framework metadata DB
   155                 // update framework metadata DB
   155                 iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, iFileName );
   156                 iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, iFileName );
   156                 iObjectInfo->SetUint( CMTPObjectMetaData::EObjectMetaDataUpdate, 1 );
   157                 iObjectInfo->SetUint( CMTPObjectMetaData::EObjectMetaDataUpdate, 1 );
   157                 iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
   158                 iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
   158                 }
   159                 }