[NMT] Set TV app path 77/265177/4
authorjaekuk, lee <juku1999@samsung.com>
Tue, 12 Oct 2021 11:36:32 +0000 (20:36 +0900)
committerjaekuk, lee <juku1999@samsung.com>
Mon, 18 Oct 2021 23:39:34 +0000 (08:39 +0900)
TV apps are installed in the "/opt/usr/apps" path.
This patch set app path for TV.

Change-Id: Iec38bc5828d6d87c864f7d799435d521830a6f61
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
wrt_feature/nmt_service/node_modules/nmt/nmt.cpp

index c71ec8e..9b11137 100755 (executable)
  *    See the License for the specific language governing permissions and\r
  *    limitations under the License.\r
  */\r
-\r
 #include <dlog/dlog.h>\r
 #include <map>\r
+#include <node.h>\r
+#include <tzplatform_config.h>\r
 #include <unistd.h>\r
 #include <v8.h>\r
-#include <node.h>\r
+\r
 #include "nmt.h"\r
 #include "translator.h"\r
 \r
@@ -77,8 +78,9 @@ void NMT::Uninit(){
 void NMT::SetPath(){\r
     logd(LOG_TAG, __PRETTY_FUNCTION__);\r
     vector<string> data_paths;\r
-    for(map<string,pair<string, string>>::iterator iter = model_list.begin(); iter != model_list.end(); ++iter ){\r
-      string modelPath = "/opt/usr/globalapps/" + iter->second.second + "/shared/res/assets";\r
+    string app_path = std::string(tzplatform_getenv(TZ_SYS_RW_APP)) + "/";\r
+    for (const auto& iter : model_list) {\r
+      string modelPath = app_path + iter.second.second + "/shared/res/assets";\r
       if(access(modelPath.c_str(), 0) != -1)\r
         data_paths.push_back(modelPath);\r
     }\r