[Release] wrt-installer_0.0.89
[framework/web/wrt-installer.git] / src / jobs / widget_install / task_commons.cpp
index 10c73e8..fea9ea1 100644 (file)
@@ -43,14 +43,19 @@ const mode_t TEMPORARY_PATH_MODE = 0775;
 } // namespace
 
 
-std::string createTempPath()
+std::string createTempPath(bool preload)
 {
     LogInfo("Step: Creating temporary path");
 
    // Temporary path
    std::ostringstream tempPathBuilder;
 
-   tempPathBuilder << WrtDB::GlobalConfig::GetUserInstalledWidgetPath();
+   if (preload) {
+       tempPathBuilder << WrtDB::GlobalConfig::GetUserPreloadedWidgetPath();
+   } else {
+       tempPathBuilder << WrtDB::GlobalConfig::GetUserInstalledWidgetPath();
+   }
+   tempPathBuilder << WrtDB::GlobalConfig::GetTmpDirPath();
    tempPathBuilder << "/";
    tempPathBuilder << TEMPORARY_PATH_POSTFIX;
    tempPathBuilder << "_";