--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Fri Apr 16 15:51:48 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Mon May 03 13:19:02 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"));
}
@@ -656,6 +663,11 @@
/**
* copy file extension by insensitive case
*/
+ if (aExtension.Length() > KMaxExtNameLength)
+ {
+ return KNullDesC;
+ }
+
TBuf<KMaxExtNameLength> extension;
extension.CopyLC(aExtension);