Fix binary symlink for service applications 32/50032/3
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 23 Oct 2015 09:40:15 +0000 (11:40 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Tue, 27 Oct 2015 12:39:23 +0000 (13:39 +0100)
Change-Id: I0de6cb3811722e01131d1a049eec826b6e140642

src/wgt/step/step_create_symbolic_link.cc

index c686382..6d53415 100644 (file)
 #include "common/utils/file_util.h"
 #include "common/utils/glist_range.h"
 
+namespace {
+
+const char kWrtServiceBinaryPath[] = "/usr/bin/wrt-service";
+
+}  // namespace
+
 namespace wgt {
 namespace filesystem {
 
@@ -35,7 +41,11 @@ common_installer::Step::Status StepCreateSymbolicLink::process() {
 
     exec_path /= bf::path(app->appid);
 
-    bf::create_symlink(bf::path(WRT_LAUNCHER), exec_path, error);
+    if (strcmp(app->component_type, "uiapp") == 0) {
+      bf::create_symlink(bf::path(WRT_LAUNCHER), exec_path, error);
+    } else {
+      bf::create_symlink(kWrtServiceBinaryPath, exec_path, error);
+    }
     if (error) {
       LOG(ERROR) << "Failed to set symbolic link "
         << boost::system::system_error(error).what();