[Release] wrt-installer_0.0.89
[framework/web/wrt-installer.git] / src / jobs / widget_install / task_unzip.cpp
index c5f63d3..fb084f6 100644 (file)
@@ -101,7 +101,7 @@ void TaskUnzip::StepUnzipPrepare()
 
     Try
     {
-        m_zip.Reset(new DPL::ZipInput(m_installerContext.locations->getWidgetSource()));
+        m_zip.reset(new DPL::ZipInput(m_installerContext.locations->getWidgetSource()));
         LogInfo("Widget package comment: " << m_zip->GetGlobalComment());
 
         // Widget package must not be empty
@@ -116,6 +116,10 @@ void TaskUnzip::StepUnzipPrepare()
     {
         ReThrowMsg(Exceptions::OpenZipFailed, m_installerContext.locations->getWidgetSource());
     }
+    Catch(DPL::ZipInput::Exception::SeekFileFailed)
+    {
+        ThrowMsg(Exceptions::ExtractFileFailed,"m_installerContext.locations->getWidgetSource()");
+    }
 }
 
 void TaskUnzip::StepUnzipProgress()
@@ -160,11 +164,11 @@ void TaskUnzip::StepUnzipProgress()
         Try
         {
             // Open file
-            DPL::ScopedPtr<DPL::ZipInput::File> file(
+            std::unique_ptr<DPL::ZipInput::File> file(
                 m_zip->OpenFile(fileName));
 
             // Extract single file
-            ExtractFile(file.Get(), fileExtractPath);
+            ExtractFile(file.get(), fileExtractPath);
         }
         Catch(DPL::ZipInput::Exception::OpenFileFailed)
         {
@@ -187,7 +191,7 @@ void TaskUnzip::StepUnzipProgress()
 void TaskUnzip::StepUnzipFinished()
 {
     // Unzip finished, close internal structures
-    m_zip.Reset();
+    m_zip.reset();
 
     // Done
     LogInfo("Unzip finished");