mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-18 08:21:30 -04:00
Ignore files that are not shared libraries when scanning for plugins
This commit is contained in:
1 parent
b80ac45d99
commit
a678f3bb25
1 file changed
+14
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user