From 7d29d399d5d9c2863e641f3b719b324af2b52e15 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 12 Oct 2021 20:36:32 +0900 Subject: [PATCH] [NMT] Set TV app path 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 --- wrt_feature/nmt_service/node_modules/nmt/nmt.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp b/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp index c71ec8e..9b11137 100755 --- a/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp +++ b/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #include #include +#include +#include #include #include -#include + #include "nmt.h" #include "translator.h" @@ -77,8 +78,9 @@ void NMT::Uninit(){ void NMT::SetPath(){ logd(LOG_TAG, __PRETTY_FUNCTION__); vector data_paths; - for(map>::iterator iter = model_list.begin(); iter != model_list.end(); ++iter ){ - string modelPath = "/opt/usr/globalapps/" + iter->second.second + "/shared/res/assets"; + string app_path = std::string(tzplatform_getenv(TZ_SYS_RW_APP)) + "/"; + for (const auto& iter : model_list) { + string modelPath = app_path + iter.second.second + "/shared/res/assets"; if(access(modelPath.c_str(), 0) != -1) data_paths.push_back(modelPath); } -- 2.7.4