ExecuteAssembly not permit native image path 67/124167/1 accepted/tizen/unified/20170410.160343 submit/tizen/20170410.100205
authorJongHeon Choi <j-h.choi@samsung.com>
Mon, 10 Apr 2017 10:37:33 +0000 (19:37 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Mon, 10 Apr 2017 10:37:44 +0000 (19:37 +0900)
Change-Id: I76f11eb94bef7574a4495aec12ac864ed986e84c

NativeLauncher/launcher/dotnet/dotnet_launcher.cc

index 15b74c9..4aabf42 100644 (file)
@@ -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)
     {