From e742eb35ccc4dab4c0b4cff65b5e72a62346aa74 Mon Sep 17 00:00:00 2001 From: F1F7Y <64418963+F1F7Y@users.noreply.github.com> Date: Fri, 28 Jul 2023 16:12:31 +0200 Subject: Fix plugins not loading (#522) Fixes a regression introduced in #513 --- NorthstarDLL/plugins/plugins.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/NorthstarDLL/plugins/plugins.cpp b/NorthstarDLL/plugins/plugins.cpp index 9ba4707a..776830a6 100644 --- a/NorthstarDLL/plugins/plugins.cpp +++ b/NorthstarDLL/plugins/plugins.cpp @@ -196,14 +196,7 @@ inline void FindPlugins(fs::path pluginPath, std::vector& paths) return; } - fs::recursive_directory_iterator iterator(pluginPath); - // ensure iterator is not empty - if (std::filesystem::begin(iterator) != std::filesystem::end(iterator)) - { - return; - } - - for (auto const& entry : iterator) + for (const fs::directory_entry& entry : fs::recursive_directory_iterator(pluginPath)) { if (fs::is_regular_file(entry) && entry.path().extension() == ".dll") paths.emplace_back(entry.path()); -- cgit v1.2.3