diff --git a/Lila/src/Platform/Linux/LinuxLibraryAdapter.cpp b/Lila/src/Platform/Linux/LinuxLibraryAdapter.cpp index 7ddbb82..a68c081 100644 --- a/Lila/src/Platform/Linux/LinuxLibraryAdapter.cpp +++ b/Lila/src/Platform/Linux/LinuxLibraryAdapter.cpp @@ -15,7 +15,7 @@ namespace Lila::Platform { } void LibraryAdapter::loadLibrary(const std::filesystem::path& path) { - handle_m = dlopen(std::filesystem::weakly_canonical(path).string().c_str(), RTLD_LAZY | RTLD_LOCAL); + handle_m = dlopen(std::filesystem::absolute(path).string().c_str(), RTLD_LAZY | RTLD_LOCAL); if (!handle_m) LILA_FATAL("Failed to load library: {}!", path.string()); diff --git a/Lila/src/Platform/Windows/WindowsLibraryAdapter.cpp b/Lila/src/Platform/Windows/WindowsLibraryAdapter.cpp index a38b30d..3f992c6 100644 --- a/Lila/src/Platform/Windows/WindowsLibraryAdapter.cpp +++ b/Lila/src/Platform/Windows/WindowsLibraryAdapter.cpp @@ -15,7 +15,7 @@ namespace Lila::Platform { } void LibraryAdapter::loadLibrary(const std::filesystem::path& path) { - handle_m = LoadLibrary(std::filesystem::weakly_canonical(path).string().c_str()); + handle_m = LoadLibraryEx(std::filesystem::absolute(path).string().c_str(), nullptr, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); if (!handle_m) LILA_FATAL("Failed to load library: {}!", path.string());