mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp
branchRCL_3
changeset 16 3673b591050c
parent 12 8b094906a049
child 19 ef55b168cedb
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Wed Mar 31 22:58:56 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Wed Apr 14 16:49:36 2010 +0300
@@ -128,6 +128,7 @@
         User::LeaveIfError(error);
         }    
     
+    iEnumerationNotified = ETrue;
     __FLOG(_L8("<< CMTPImageDataProvider::ConstructL"));
     }
 
@@ -271,6 +272,8 @@
     __FLOG(_L8(">> StartObjectEnumerationL"));
     
     TBool isComplete = ETrue;
+    iEnumerationNotified = EFalse;
+
     if (aStorageId == KMTPStorageAll)
         {
         /*
@@ -479,7 +482,11 @@
     __FLOG(_L8(">> NotifyEnumerationCompletedL"));
     __FLOG_VA((_L8("Enumeration of storage 0x%08X completed with error status %d"), aStorageId, aError));
         
-    Framework().ObjectEnumerationCompleteL(aStorageId);
+    if (!iEnumerationNotified)
+        {
+        iEnumerationNotified = ETrue;
+        Framework().ObjectEnumerationCompleteL(aStorageId);
+        }
     
     __FLOG(_L8("<< HandleEnumerationCompletedL"));
     }