Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Dec 1, 2023
1 parent ea71275 commit f6ea609
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions userspace/sysdig/utils/plugin_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ void plugin_utils::load_plugin(sinsp *inspector, const std::string& name)
auto& plugins = m_plugins;
bool found = iterate_plugins_dirs(m_dirs, [&inspector, &name, &soname, &plugins] (const std::filesystem::path file) -> bool {

auto filename = file.filename();
auto filepath = std::filesystem::absolute(file);
auto filename = file.filename().generic_string();
auto filepath = std::filesystem::absolute(file).generic_string();

if (filename == name || filename == soname)
{
plugin_entry p;
p.used = true;
p.inited = false;
p.libpath = filepath.generic_string();
p.libpath = filepath;
p.names.insert(soname);
p.names.insert(filepath);
p.names.insert(filename);
Expand All @@ -333,7 +333,7 @@ void plugin_utils::read_plugins_from_dirs(sinsp *inspector)
auto tmpinsp = std::unique_ptr<sinsp>(new sinsp());
iterate_plugins_dirs(m_dirs, [&inspector, &plugins, &tmpinsp] (const std::filesystem::path file) -> bool {

auto filepath = std::filesystem::absolute(file);
auto filepath = std::filesystem::absolute(file).generic_string();

// we temporarily load the plugin just to read its info,
// but we don't actually load it in our inspector
Expand All @@ -342,9 +342,9 @@ void plugin_utils::read_plugins_from_dirs(sinsp *inspector)
plugin_entry p;
p.used = false;
p.inited = false;
p.libpath = filepath.generic_string();
p.libpath = filepath;
p.names.insert(filepath);
p.names.insert(file.filename());
p.names.insert(file.filename().generic_string());
p.names.insert(plugin->name());
plugins.push_back(p);
return false;
Expand Down

0 comments on commit f6ea609

Please sign in to comment.