--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp Wed Sep 01 12:30:28 2010 +0100
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp Tue Sep 14 21:23:06 2010 +0300
@@ -602,9 +602,20 @@
if ( iIsMoveOperation )
{
MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: move operation failed %d", aErr );
- MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back in MDS" );
- iMediaForMoveOp->SetTextValueL( KMPXMediaGeneralUri, iSourcePath );
- iCollection.SetVideoL( *iMediaForMoveOp );
+
+ if ( ! BaflUtils::FileExists( iCollection.iFs, iSourcePath ) )
+ {
+ MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: mmc removed, deleting the old media" );
+ iCollection.iMyVideosMdsDb->RemoveVideo( iMediaForMoveOp->ValueTObjectL<TMPXItemId>(
+ KMPXMediaGeneralId ).iId1 );
+ }
+ else
+ {
+ MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back in MDS" );
+ iMediaForMoveOp->SetTextValueL( KMPXMediaGeneralUri, iSourcePath );
+ iCollection.SetVideoL( *iMediaForMoveOp );
+ }
+
MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: deleting target file");
TInt delErr = BaflUtils::DeleteFile( iCollection.iFs, iTargetPath );
if ( delErr != KErrNone )