From a678f3bb2561a2bad2b4333111da8036b3852f94 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Tue, 25 Aug 2026 11:11:45 -0500 Subject: [PATCH] Ignore files that are not shared libraries when scanning for plugins --- PluginManager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PluginManager.cpp b/PluginManager.cpp index a657825ca..79f84f975 100644 --- a/PluginManager.cpp +++ b/PluginManager.cpp @@ -160,6 +160,20 @@ void PluginManager::ScanAndLoadPluginsFrom(const filesystem::path & plugins_dir, } filesystem::path plugin_path = entry.path(); + + /*-------------------------------------------------*\ + | Skip any files that are not plugin files | + | | + | Plugin files are shared libraries with .dll, .so, | + | or .dylib extensions | + \*-------------------------------------------------*/ + if((plugin_path.extension() != ".dll") + && (plugin_path.extension() != ".so") + && (plugin_path.extension() != ".dylib")) + { + continue; + } + LOG_TRACE("[%s] Found plugin file %s", PLUGINMANAGER, plugin_path.filename().generic_u8string().c_str()); AddPlugin(plugin_path, is_system); }