WidgetLocation::WidgetLocation(const std::string & widgetname,
std::string sourcePath,
WrtDB::PackagingType t,
- bool isReadonly) :
+ bool isReadonly,
+ InstallMode::ExtensionType eType) :
m_pkgid(widgetname),
m_widgetSource(sourcePath),
m_type(t),
m_temp(
- new WidgetLocation::DirectoryDeletor(isReadonly))
+ new WidgetLocation::DirectoryDeletor(isReadonly)),
+ m_extensionType(eType)
{
if (isReadonly) {
m_installedPath += WrtDB::GlobalConfig::GetUserPreloadedWidgetPath();
std::string sourcePath,
std::string dirPath,
WrtDB::PackagingType t,
- bool isReadonly) :
+ bool isReadonly,
+ InstallMode::ExtensionType eType) :
m_pkgid(widgetname),
m_widgetSource(sourcePath),
m_type(t),
- m_temp(new WidgetLocation::DirectoryDeletor(dirPath))
+ m_temp(new WidgetLocation::DirectoryDeletor(dirPath)),
+ m_extensionType(eType)
{
if (isReadonly) {
m_installedPath += WrtDB::GlobalConfig::GetUserPreloadedWidgetPath();
std::string WidgetLocation::getTemporaryRootDir() const
{
- if (m_type == WrtDB::PKG_TYPE_DIRECTORY_WEB_APP) {
+ if (m_extensionType == InstallMode::ExtensionType::DIR) {
return getWidgetSource() + WrtDB::GlobalConfig::GetWidgetSrcPath();
}
if (m_type == WrtDB::PKG_TYPE_HYBRID_WEB_APP) {
path = m_widgetSource.substr(0, index);
}
return path;
- } else if (m_type == WrtDB::PKG_TYPE_DIRECTORY_WEB_APP) {
- return getWidgetSource() + WrtDB::GlobalConfig::GetWidgetSrcPath();
} else {
return getTemporaryRootDir();
}