From 01f3f350fe6d81c6f0bc93885bc0e30d1525c103 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sat, 27 Aug 2022 02:58:34 +0200 Subject: [PATCH] Core/PluginLoader: Allows loading from environment folders --- src/Nazara/Core/PluginLoader.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Nazara/Core/PluginLoader.cpp b/src/Nazara/Core/PluginLoader.cpp index b44f19638..d5deaa027 100644 --- a/src/Nazara/Core/PluginLoader.cpp +++ b/src/Nazara/Core/PluginLoader.cpp @@ -27,7 +27,6 @@ namespace Nz if (path.extension() != NAZARA_DYNLIB_EXTENSION) path += NAZARA_DYNLIB_EXTENSION; - bool exists = false; if (!path.is_absolute()) { for (const std::filesystem::path& dir : m_directories) @@ -36,16 +35,10 @@ namespace Nz if (std::filesystem::exists(testPath)) { path = testPath; - exists = true; break; } } } - else if (std::filesystem::exists(path)) - exists = true; - - if (!exists) - throw std::runtime_error("failed to find plugin file"); DynLib library; if (!library.Load(path))