Avoid searching a directory for dynamic plugins multiple times

This commit is contained in:
Jon Siwek 2021-03-09 15:00:27 -08:00
parent f2d3bf3037
commit 36099c5553
2 changed files with 20 additions and 0 deletions

View file

@ -416,6 +416,11 @@ private:
void MetaHookPre(HookType hook, const HookArgumentList& args) const;
void MetaHookPost(HookType hook, const HookArgumentList& args, const HookArgument& result) const;
// Directories that have already been searched for dynamic plugins.
// Used to prevent multiple searches of the same dirs (e.g. via symlinks).
// The paths stored in the set are made canonical via realpath().
std::set<std::string, std::less<>> searched_dirs;
// Plugins that were explicitly requested to be activated, but failed to
// load at first.
std::set<std::string> requested_plugins;