InstallerError
UninstallStep::OnStateGetPackageInfo(void)
{
+ bool res = true;
+ result r = E_SUCCESS;
InstallerError error = INSTALLER_ERROR_NONE;
PackageId packageId = __pContext->__packageId;
AppLog("package = %ls", packageId.GetPointer());
- result r = pPackageInfoImpl->Construct(packageId);
+ r = pPackageInfoImpl->Construct(packageId);
TryReturn(r == E_SUCCESS, INSTALLER_ERROR_INTERNAL_STATE, "pPackageInfoImpl->Construct(%ls) failed.", packageId.GetPointer());
// bool isUninstallable = pPackageInfoImpl->IsUninstallable();
__pContext->__isPreloaded = true;
}
- __pContext->__rootPath = pPackageInfoImpl->GetAppRootPath();
+ //res = IsAvailableUninstall();
+ //TryReturn(res == true, INSTALLER_ERROR_DISABLED, "IsAvailableUninstall(%ls) failed.", packageId.GetPointer());
- if (__pContext->__isHybridService == true)
- {
- AppLog("Uninstallation for HybridService");
- __state = STATE_TERMINATE_APP;
- return error;
- }
+ __pContext->__rootPath = pPackageInfoImpl->GetAppRootPath();
if (pPackageInfoImpl->IsInstalledInExternalStorage() == true)
{
{
InstallerError error = INSTALLER_ERROR_NONE;
- InstallerUtil::TerminateApps(__pContext->__packageId);
+ InstallerUtil::TerminateApps(__pContext->__packageId, true);
GoNextState();
return error;
AppLog("Directory::Remove - START");
- if (__pContext->__isHybridService == true)
+ String realPath;
+ if (InstallerUtil::IsSymlink(rootPath) == true)
{
- AppLog("Uninstallation for HybridService - skip Remove");
-
- }
- else
- {
- String realPath;
- if (InstallerUtil::IsSymlink(rootPath) == true)
+ if (InstallerUtil::GetRealPath(rootPath, realPath) == true)
{
- if (InstallerUtil::GetRealPath(rootPath, realPath) == true)
- {
- InstallerUtil::Remove(realPath);
- }
+ InstallerUtil::Remove(realPath);
}
-
- InstallerUtil::Remove(rootPath);
}
+ InstallerUtil::Remove(rootPath);
+
+
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
TryReturn(pAppDataList, INSTALLER_ERROR_INTERNAL_STATE, "pAppDataList is null");