From 246976d7c093f576bc7d2f02f3187d8c1644e44a Mon Sep 17 00:00:00 2001 From: Senthil Date: Wed, 13 Apr 2016 11:46:06 -0700 Subject: [PATCH] Realpath the app dll --- src/corehost/cli/fxr/fx_muxer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corehost/cli/fxr/fx_muxer.cpp b/src/corehost/cli/fxr/fx_muxer.cpp index a9ebde2ed..f206922c9 100644 --- a/src/corehost/cli/fxr/fx_muxer.cpp +++ b/src/corehost/cli/fxr/fx_muxer.cpp @@ -292,7 +292,7 @@ int fx_muxer_t::parse_args_and_execute( } app_candidate = argv[cur_i]; - bool is_app_runnable = ends_with(app_candidate, _X(".dll"), false) || ends_with(app_candidate, _X(".exe"), false); + bool is_app_runnable = (ends_with(app_candidate, _X(".dll"), false) || ends_with(app_candidate, _X(".exe"), false)) && pal::realpath(&app_candidate); trace::verbose(_X("App %s runnable=[%d]"), app_candidate.c_str(), is_app_runnable); // If exec mode is on, then check we have a dll at this point if (exec_mode) @@ -300,6 +300,7 @@ int fx_muxer_t::parse_args_and_execute( if (!is_app_runnable) { trace::error(_X("dotnet exec needs a dll to execute. Try dotnet [--help]")); + *is_an_app = false; return InvalidArgFailure; } }