Skip to content

Commit

Permalink
plugin-loader: print an error when plugin .so is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ammen99 committed May 21, 2021
1 parent 0b899d3 commit ee64e85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/output/plugin-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,23 @@ void plugin_manager::reload_dynamic_plugins()
continue;
}

bool found = false;
for (std::filesystem::path plugin_prefix : plugin_prefixes)
{
auto plugin_path = plugin_prefix / ("lib" + plugin_name + ".so");
if (std::filesystem::exists(plugin_path))
{
found = true;
next_plugins.push_back(plugin_path);
break;
}
}

if (!found)
{
LOGE("Could not find plugin \"", plugin_name, "\"",
" in WAYFIRE_PLUGIN_PATH or in \"", PLUGIN_PATH, "\"");
}
}
}

Expand Down

0 comments on commit ee64e85

Please sign in to comment.