#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 <task_commons.h>
#include <sys/stat.h>
#include <dlfcn.h>
#include <installer_log.h>
_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;
_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
{