MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / get_plugin_path_for_name

Method get_plugin_path_for_name

src/core/plugin-loader.cpp:334–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334std::optional<std::string> wf::get_plugin_path_for_name(
335 std::vector<std::string> plugin_paths, std::string plugin_name)
336{
337 if (plugin_name.at(0) == '/')
338 {
339 return plugin_name;
340 }
341
342 for (std::filesystem::path plugin_prefix : plugin_paths)
343 {
344 auto plugin_path = plugin_prefix / ("lib" + plugin_name + ".so");
345 if (std::filesystem::exists(plugin_path))
346 {
347 return plugin_path;
348 }
349 }
350
351 return {};
352}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected