fixed icon path at hybrid web app for backend installer.
authorSoyoung Kim <sy037.kim@samsung.com>
Wed, 29 May 2013 05:56:14 +0000 (14:56 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Wed, 29 May 2013 06:00:34 +0000 (15:00 +0900)
[Issue#] N/A
[Problem] can't get icon path at backend installer.
[Cause] icon path is wrong when hybrid web app.
[Solution] fixed icon path.
[SCMRequest] N/A

Change-Id: I675a326887c599144cdd89ab72af325cf42bb24a

src/pkg-manager/backendlib.cpp

index 3786026..48f98d4 100644 (file)
@@ -327,7 +327,15 @@ char* getIconInfo(const std::string widgetPath,
 
         std::unique_ptr<DPL::ZipInput::File> iconFile;
 
-        iconFile.reset(zipFile->OpenFile(icon_name));
+        Try {
+            iconFile.reset(zipFile->OpenFile(icon_name));
+        }
+        Catch(DPL::ZipInput::Exception::OpenFileFailed)
+        {
+            LogDebug("This web app is hybrid web app");
+            std::string hybrid_icon = "res/wgt/" + icon_name;
+            iconFile.reset(zipFile->OpenFile(hybrid_icon));
+        }
 
         DPL::BinaryQueue buffer;
         DPL::AbstractWaitableInputAdapter inputAdapter(iconFile.get());