From: jaekuk, lee Date: Tue, 12 Oct 2021 11:36:32 +0000 (+0900) Subject: [NMT] Set TV app path X-Git-Tag: submit/tizen/20211022.032550^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d29d399d5d9c2863e641f3b719b324af2b52e15;p=platform%2Fframework%2Fweb%2Fwrtjs.git [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 --- diff --git a/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp b/wrt_feature/nmt_service/node_modules/nmt/nmt.cpp index c71ec8e5..9b111379 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); }