#include "InstallerUtil.h"
-#define OSP_INSTALLER_VERSION "version=[20130826.2]"
+#define OSP_INSTALLER_VERSION "version=[20130826.3]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
bool
ConfigurationManager::PostInstall(InstallationContext* pContext, bool error) const
{
+ bool res = true;
PackageId packageId = pContext->__packageId;
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId));
TryReturn(pPackageId, false, "pPackageId is null.");
smackManager.Construct(pContext);
smackManager.EnablePermissions(packageId);
- RegisterCoreXmlFile(pContext);
+ res = RegisterCoreXmlFile(pContext);
+ TryReturn(res, false, "RegisterCoreXmlFile() failed.");
if ((pContext->__isUpdated == true) && (pContext->__isPreloaded == false))
{
bool
ManifestHandler::OnPrivilegeValue(const char* pCharacters)
{
- __pPrivilegeList->Add(*new (std::nothrow) String(pCharacters));
+ std::unique_ptr<String> pPrivilege(new (std::nothrow) String(pCharacters));
+ TryReturn(pPrivilege, false, "pPrivilege is null.");
+
+ if (__pPrivilegeList->Contains(*pPrivilege.get()) == true)
+ {
+ AppLog("Privilege(%ls) is duplicated.", pPrivilege->GetPointer());
+ return false;
+ }
+
+ __pPrivilegeList->Add(pPrivilege.release());
AppLog("<Privilege>%s</Privilege>", pCharacters);
return true;