Correcting the fix to work with inbox PS

This commit is contained in:
Mike Richmond committed 2016-08-09 13:23:33 -07:00
1 parent 0544bc2baf
commit 6f8794d835
1 file changed
+5 -3
@@ -1361,9 +1361,11 @@ namespace NativeMsh
bool listEmpty = true;
this->GetTrustedAssemblyList(hostEnvironment.GetCoreCLRDirectoryPath(), assemblyList, listEmpty);
// Fall back to attempt to load the CLR from the inbox location if
// the configuration file pointed to an invalid directory.
if (listEmpty)
// Fall back to attempt to load the CLR from the alternate inbox location
// or if the ALC was not located in the CoreCLR directory.
std::string assemblyListToSearch = assemblyList.str();
if (listEmpty ||
(std::string::npos == assemblyListToSearch.rfind("Microsoft.PowerShell.CoreCLR.AssemblyLoadContext")))
{
char coreCLRPowerShellExtInstallPath[MAX_PATH];
::ExpandEnvironmentStringsA(coreCLRPowerShellExtInstallDirectory, coreCLRPowerShellExtInstallPath, MAX_PATH);