Update src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs

Co-authored-by: Ilya <darpa@yandex.ru>
This commit is contained in:
Steve Lee 2023-12-13 09:44:12 -08:00 committed by GitHub
parent 99172aa3ad
commit 5d04af6926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,9 +252,7 @@ namespace System.Management.Automation
{
fullName = Path.Combine(folder, s_nativeDllSubFolder, libraryName) + s_nativeDllExtension;
}
else if ((extension == ".dll" && !Platform.IsWindows) ||
(extension == ".so" && !Platform.IsLinux) ||
(extension == ".dylib" && !Platform.IsMacOS))
else if (extension != s_nativeDllExtension)
{
fullName = Path.Combine(folder, s_nativeDllSubFolder, Path.GetFileNameWithoutExtension(libraryName)) + s_nativeDllExtension;
}