videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp
branchRCL_3
changeset 24 f87e8c4ac026
parent 23 befca0ec475f
equal deleted inserted replaced
23:befca0ec475f 24:f87e8c4ac026
   600     if ( aErr != KErrNone )
   600     if ( aErr != KErrNone )
   601         {
   601         {
   602         if ( iIsMoveOperation )
   602         if ( iIsMoveOperation )
   603             {
   603             {
   604             MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: move operation failed %d", aErr );
   604             MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: move operation failed %d", aErr );
   605             MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back in MDS" );
   605 
   606             iMediaForMoveOp->SetTextValueL( KMPXMediaGeneralUri, iSourcePath );
   606             if ( ! BaflUtils::FileExists( iCollection.iFs, iSourcePath ) )
   607             iCollection.SetVideoL( *iMediaForMoveOp );
   607                 {
       
   608                 MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: mmc removed, deleting the old media" );
       
   609                 iCollection.iMyVideosMdsDb->RemoveVideo( iMediaForMoveOp->ValueTObjectL<TMPXItemId>(
       
   610                         KMPXMediaGeneralId ).iId1 );
       
   611                 }
       
   612             else
       
   613                 {
       
   614                 MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back in MDS" );
       
   615                 iMediaForMoveOp->SetTextValueL( KMPXMediaGeneralUri, iSourcePath );
       
   616                 iCollection.SetVideoL( *iMediaForMoveOp );
       
   617                 }
       
   618 
   608             MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: deleting target file");
   619             MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: deleting target file");
   609             TInt delErr = BaflUtils::DeleteFile( iCollection.iFs, iTargetPath );
   620             TInt delErr = BaflUtils::DeleteFile( iCollection.iFs, iTargetPath );
   610             if ( delErr != KErrNone )
   621             if ( delErr != KErrNone )
   611                 {
   622                 {
   612                 MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: delete for target file failed: %d", delErr );
   623                 MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: delete for target file failed: %d", delErr );