From: Woongsuk Cho Date: Tue, 31 Mar 2020 04:46:18 +0000 (+0900) Subject: Use absolute path of input dll path. X-Git-Tag: submit/tizen/20200410.075941~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4f1d12a6abfda19246c6a5af5ed42f29b75d41b;p=platform%2Fcore%2Fdotnet%2Flauncher.git Use absolute path of input dll path. If only the dll file name is entered as an input parameter without a path, it does not work properly. To solve that issue, get the absolute path from dll file, and pass that to coreclr --- diff --git a/NativeLauncher/launcher/main.cc b/NativeLauncher/launcher/main.cc index 755a82b..42ca9f4 100644 --- a/NativeLauncher/launcher/main.cc +++ b/NativeLauncher/launcher/main.cc @@ -78,7 +78,8 @@ extern "C" int realMain(int argc, char *argv[], const char* mode) char appId[APPID_MAX_LENGTH] = {0,}; std::string appRoot; snprintf(appId, 16, "%s", "dotnet-launcher"); - appRoot = baseName(argv[1]); + std::string absoluteDllPath = absolutePath(argv[1]); + appRoot = baseName(absoluteDllPath); if (runtime->initialize(true, false, appRoot.c_str()) != 0) { _ERR("Failed to initialize"); @@ -87,7 +88,7 @@ extern "C" int realMain(int argc, char *argv[], const char* mode) int argsLen = vargs.size() - 1; char** args = &vargs[1]; - if (runtime->launch(appId, appRoot.c_str(), argv[1], argsLen, args)) { + if (runtime->launch(appId, appRoot.c_str(), absoluteDllPath.c_str(), argsLen, args)) { _ERR("Failed to launch"); return 1; }