m_context.tzPkgid = DPL::ToUTF8String(dao.getTizenPkgId());
m_context.locations = WidgetLocation(m_context.tzPkgid);
m_context.locations->registerAppid(m_context.tzAppid);
+ m_context.installedPath =
+ DPL::ToUTF8String(*dao.getWidgetInstalledPath());
LogInfo("Widget model exists. App id : " << m_context.tzAppid);
if (0 == installPath.compare(0, PRELOAD_INSTALLED_PATH.length(),
PRELOAD_INSTALLED_PATH)) {
- LogError("This widget is prealoaded. So it cann't be removed");
- return WidgetStatus::PREALOAD;
+ LogDebug("This widget is prealoded.");
}
} Catch(WidgetDAOReadOnly::Exception::WidgetNotExist) {
LogDebug("package id : " << pkgId);
{
LogDebug("Removing directory");
m_context.removeStarted = true;
- std::string widgetDir =
- m_context.locations->getPackageInstallationDir();
- if (!WrtUtilRemove(widgetDir)) {
- LogError("Removing widget installation directory failed");
+ if (!WrtUtilRemove(m_context.installedPath)) {
+ LogError("Removing widget installation directory failed : " <<
+ m_context.installedPath);
}
std::string dataDir = m_context.locations->getUserDataRootDir();
if (!WrtUtilRemove(dataDir)) {