#include "InstallerUtil.h"
-#define OSP_INSTALLER_VERSION "version=[20130429.2]"
+#define OSP_INSTALLER_VERSION "version=[20130429.3]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
{
TryReturn(pList, false, "pList is null.");
- IMapEnumerator* pMapEnum = pList->GetMapEnumeratorN();
+ std::unique_ptr< IMapEnumerator > pMapEnum(pList->GetMapEnumeratorN());
TryReturn(pMapEnum, true, "pMapEnum is null.");
while (pMapEnum->MoveNext() == E_SUCCESS)
{
- String* pSize = static_cast<String*> (pMapEnum->GetKey());
- if( pSize && IsValidLiveboxSize(*pSize) == false)
+ String* pSize = static_cast< String* > (pMapEnum->GetKey());
+ TryReturn(pSize, false, "GetKey() failed. [%s]", GetErrorMessage(GetLastResult()));
+
+ if(IsValidLiveboxSize(*pSize) == false)
{
AppLog("The size %ls is ignored, because it's invalid for privilege level(%d) of the app.", pSize->GetPointer(), __pContext->__privilegeLevel);
continue;
}
- String* pPriviewImage = static_cast<String*> (pMapEnum->GetValue());
+
+ String* pPriviewImage = static_cast< String* > (pMapEnum->GetValue());
__pWriter->StartElement(element);
- if (pPriviewImage && (pPriviewImage->IsEmpty() == false))
+ if (pPriviewImage && pPriviewImage->IsEmpty() == false)
{
String previewImagePath;
previewImagePath.Format(1024, L"%ls/%ls", previewDir.GetPointer(), pPriviewImage->GetPointer());
__pWriter->EndElement();
}
- delete pMapEnum;
return true;
}