X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fjobs%2Fwidget_install%2Fwidget_unzip.cpp;h=d41b8903789a45d97ddb8d3928184e845af1d2bc;hb=1e16c50caf07b0e15aa22d14452ee86f32f4688d;hp=8a7f60116c62e16df5f99173a7073da962b45683;hpb=de578322b45cb0891ebfaec77d6be229e4f771b5;p=framework%2Fweb%2Fwrt-installer.git diff --git a/src/jobs/widget_install/widget_unzip.cpp b/src/jobs/widget_install/widget_unzip.cpp index 8a7f601..d41b890 100644 --- a/src/jobs/widget_install/widget_unzip.cpp +++ b/src/jobs/widget_install/widget_unzip.cpp @@ -25,9 +25,9 @@ #include #include #include +#include "dpl/utils/path.h" #include #include -#include #include #include #include @@ -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 - 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; @@ -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 - 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 {