Core/DynLib: Fix extension handling
This commit is contained in:
@@ -33,11 +33,7 @@ namespace Nz
|
||||
|
||||
bool DynLibImpl::Load(const std::filesystem::path& libraryPath, std::string* errorMessage)
|
||||
{
|
||||
std::filesystem::path path = libraryPath;
|
||||
if (path.extension() != ".dll")
|
||||
path += ".dll";
|
||||
|
||||
m_handle = LoadLibraryExW(ToWideString(path.generic_u8string()).data(), nullptr, (path.is_absolute()) ? LOAD_WITH_ALTERED_SEARCH_PATH : 0);
|
||||
m_handle = LoadLibraryExW(ToWideString(libraryPath.generic_u8string()).data(), nullptr, (libraryPath.is_absolute()) ? LOAD_WITH_ALTERED_SEARCH_PATH : 0);
|
||||
if (m_handle)
|
||||
return true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user