From 3cf211da1beb8cafd4ad8a94f3827caa673a63bf Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Mon, 10 Apr 2017 19:37:33 +0900 Subject: [PATCH] ExecuteAssembly not permit native image path Change-Id: I76f11eb94bef7574a4495aec12ac864ed986e84c --- NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 15b74c9..4aabf42 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -275,18 +275,6 @@ int CoreRuntime::Launch(const char* app_id, const char* root, const char* path, return 1; } - std::string cpppath(path); - - if (IsManagedAssembly(cpppath) && !IsNativeImage(cpppath)) - { - size_t extindex = cpppath.size() - 4; - cpppath = cpppath.substr(0, extindex) + ".ni" + cpppath.substr(extindex, 4); - if (!FileNotExist(cpppath)) - { - path = cpppath.c_str(); - } - } - if (FileNotExist(path)) { _ERR("File not exist : %s", path); @@ -315,6 +303,18 @@ int CoreRuntime::Launch(const char* app_id, const char* root, const char* path, bool success = false; if (LaunchFunction != nullptr) { + std::string cpppath(path); + + if (IsManagedAssembly(cpppath) && !IsNativeImage(cpppath)) + { + size_t extindex = cpppath.size() - 4; + cpppath = cpppath.substr(0, extindex) + ".ni" + cpppath.substr(extindex, 4); + if (!FileNotExist(cpppath)) + { + path = cpppath.c_str(); + } + } + success = LaunchFunction(root, path, argc, argv); if (!success) { -- 2.7.4