{
_D("StepRemoveInstallationDirectory started");
Try {
- // In some case, app2ext fail to uninstall(remove directory) because of mount issue.
- bool removed = false;
-
int ret = app2ext_get_app_location(m_context.tzPkgid.c_str());
// app2ext remove /opt/usr/apps[pkdid] directory in post_uninstall() function.
WidgetInstallToExtSingleton::Instance().initialize(m_context.tzPkgid);
WidgetInstallToExtSingleton::Instance().uninstallation();
WidgetInstallToExtSingleton::Instance().deinitialize();
- removed = true;
}
Catch(WidgetInstallToExt::Exception::ErrorInstallToExt)
{
// i.e.) SD card isn't inserted or unmounted.
// This behavior is recommended by platform(app2sd maintainer).
_E("Fail to remove external directory");
+ ThrowMsg(Exceptions::RemoveFileFailure, "Cann't remove external directory");
}
- }
-
- // If fail to remove directory in the app2ext retry remove directroy with below code.
- if (!removed && APP2EXT_NOT_INSTALLED != ret) {
+ } else if (APP2EXT_NOT_INSTALLED != ret) {
_D("Removing directory");
std::string userAppsPath = WrtDB::GlobalConfig::GetUserInstalledWidgetPath();