projects
/
framework
/
web
/
wrt-installer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Add send signal if there is not enough memory during web app installation"
[framework/web/wrt-installer.git]
/
src
/
jobs
/
widget_install
/
widget_unzip.cpp
diff --git
a/src/jobs/widget_install/widget_unzip.cpp
b/src/jobs/widget_install/widget_unzip.cpp
index
8a7f601
..
d41b890
100644
(file)
--- a/
src/jobs/widget_install/widget_unzip.cpp
+++ b/
src/jobs/widget_install/widget_unzip.cpp
@@
-25,9
+25,9
@@
#include <widget_install/job_widget_install.h>
#include <dpl/copy.h>
#include <dpl/file_output.h>
#include <widget_install/job_widget_install.h>
#include <dpl/copy.h>
#include <dpl/file_output.h>
+#include "dpl/utils/path.h"
#include <dpl/abstract_waitable_input_adapter.h>
#include <dpl/wrt-dao-ro/global_config.h>
#include <dpl/abstract_waitable_input_adapter.h>
#include <dpl/wrt-dao-ro/global_config.h>
-#include <task_commons.h>
#include <sys/stat.h>
#include <dlfcn.h>
#include <installer_log.h>
#include <sys/stat.h>
#include <dlfcn.h>
#include <installer_log.h>
@@
-106,7
+106,14
@@
void WidgetUnzip::unzipProgress(const std::string &destination)
_D("Path to extract: %s", newPath.c_str());
// Create path in case of it is empty
_D("Path to extract: %s", newPath.c_str());
// Create path in case of it is empty
- createTempPath(newPath);
+ Try
+ {
+ DPL::Utils::MakeDir(DPL::Utils::Path(newPath));
+ }
+ Catch(DPL::Utils::Path::BaseException)
+ {
+ ThrowMsg(Exceptions::FileOperationFailed, "Failed to create temporary directory");
+ }
} else {
// This is regular file
std::string fileExtractPath = destination + "/" + fileName;
} else {
// This is regular file
std::string fileExtractPath = destination + "/" + fileName;
@@
-119,7
+126,14
@@
void WidgetUnzip::unzipProgress(const std::string &destination)
_D("Path and file: %s : %s", pathAndFile.path.c_str(), pathAndFile.file.c_str());
// First, ensure that path exists
_D("Path and file: %s : %s", pathAndFile.path.c_str(), pathAndFile.file.c_str());
// First, ensure that path exists
- createTempPath(pathAndFile.path);
+ Try
+ {
+ DPL::Utils::MakeDir(DPL::Utils::Path(pathAndFile.path));
+ }
+ Catch(DPL::Utils::Path::BaseException)
+ {
+ ThrowMsg(Exceptions::FileOperationFailed, "Failed to create temporary directory");
+ }
Try
{
Try
{