Core/DynLib: Fix extension handling
This commit is contained in:
@@ -74,10 +74,13 @@ namespace Nz
|
||||
*
|
||||
* \remark Produces a NazaraError if library is could not be loaded
|
||||
*/
|
||||
bool DynLib::Load(const std::filesystem::path& libraryPath)
|
||||
bool DynLib::Load(std::filesystem::path libraryPath)
|
||||
{
|
||||
Unload();
|
||||
|
||||
if (libraryPath.extension() != NAZARA_DYNLIB_EXTENSION)
|
||||
libraryPath += NAZARA_DYNLIB_EXTENSION;
|
||||
|
||||
auto impl = std::make_unique<DynLibImpl>(this);
|
||||
if (!impl->Load(libraryPath, &m_lastError))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user